net: hinic: fix the issue of double release MBOX callback of VF
authorZhengchao Shao <shaozhengchao@huawei.com>
Wed, 19 Oct 2022 09:57:54 +0000 (17:57 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 21 Oct 2022 04:09:48 +0000 (21:09 -0700)
In hinic_vf_func_init(), if VF fails to register information with PF
through the MBOX, the MBOX callback function of VF is released once. But
it is released again in hinic_init_hwdev(). Remove one.

Fixes: 7dd29ee12865 ("hinic: add sriov feature support")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/huawei/hinic/hinic_sriov.c

index a5f08b9..f7e05b4 100644 (file)
@@ -1174,7 +1174,6 @@ int hinic_vf_func_init(struct hinic_hwdev *hwdev)
                        dev_err(&hwdev->hwif->pdev->dev,
                                "Failed to register VF, err: %d, status: 0x%x, out size: 0x%x\n",
                                err, register_info.status, out_size);
-                       hinic_unregister_vf_mbox_cb(hwdev, HINIC_MOD_L2NIC);
                        return -EIO;
                }
        } else {