Loading
net: hns3: release PTP resources if pf initialization failed
mainline inclusion from mainline-v6.9-rc4 commit 950aa42399893a170d9b57eda0e4a3ff91fd8b70 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9VALY Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=950aa42399893a170d9b57eda0e4a3ff91fd8b70 ---------------------------------------------------- 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:Peiyang Wang <wangpeiyang1@huawei.com> Signed-off-by:
Jijie Shao <shaojijie@huawei.com> Reviewed-by:
Hariprasad Kelam <hkelam@marvell.com> Signed-off-by:
Paolo Abeni <pabeni@redhat.com> Signed-off-by:
chenyi <chenyi211@huawei.com>