Commit 950aa42
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: eaf83ae ("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>1 parent 6639a7b commit 950aa42
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11764 | 11764 | | |
11765 | 11765 | | |
11766 | 11766 | | |
11767 | | - | |
| 11767 | + | |
11768 | 11768 | | |
11769 | 11769 | | |
11770 | 11770 | | |
| |||
11815 | 11815 | | |
11816 | 11816 | | |
11817 | 11817 | | |
| 11818 | + | |
| 11819 | + | |
11818 | 11820 | | |
11819 | 11821 | | |
11820 | 11822 | | |
| |||
0 commit comments