“914643d7c45f76ada2c0fae503455a3a6846a49f”上不存在“tests/git@gitcode.net:taosdata/tdengine.git”
提交 9fc55413 编写于 作者: H Huazhong Tan 提交者: David S. Miller

net: hns3: fix improper error handling in the hclge_init_ae_dev()

While hclge_init_umv_space() failed in the hclge_init_ae_dev(),
we should undo all the operation which has been done successfully,
the last success operation maybe hclge_mac_mdio_config(), so if
hclge_init_umv_space() failed, we also need to undo it.

Fixes: 288475b2ad01 ("{topost} net: hns3: refine umv space allocation")
Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: NPeng Li <lipeng321@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 472d7ece
...@@ -7383,7 +7383,7 @@ static int hclge_init_ae_dev(struct hnae3_ae_dev *ae_dev) ...@@ -7383,7 +7383,7 @@ static int hclge_init_ae_dev(struct hnae3_ae_dev *ae_dev)
ret = hclge_init_umv_space(hdev); ret = hclge_init_umv_space(hdev);
if (ret) { if (ret) {
dev_err(&pdev->dev, "umv space init error, ret=%d.\n", ret); dev_err(&pdev->dev, "umv space init error, ret=%d.\n", ret);
goto err_msi_irq_uninit; goto err_mdiobus_unreg;
} }
ret = hclge_mac_init(hdev); ret = hclge_mac_init(hdev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册