Skip to content
Commit 950aa423 authored by Peiyang Wang's avatar Peiyang Wang Committed by Paolo Abeni
Browse files

net: hns3: release PTP resources if pf initialization failed

During the PF initialization process, hclge_update_port_info may return an
error code for some reason. At this point,  the ptp initialization has been
completed. To void memory leaks, the resources that are applied by ptp
should be released. Therefore, when hclge_update_port_info returns an error
code, hclge_ptp_uninit is called to release the corresponding resources.

Fixes: eaf83ae5

 ("net: hns3: add querying fec ability from firmware")
Signed-off-by: default avatarPeiyang Wang <wangpeiyang1@huawei.com>
Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
Reviewed-by: default avatarHariprasad Kelam <hkelam@marvell.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 6639a7b9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment