diff mbox series

[v2,2/7] net/hns3: fix missing rollback in PF init

Message ID 1618017080-50053-3-git-send-email-humin29@huawei.com (mailing list archive)
State Accepted
Delegated to: Ferruh Yigit
Headers show
Series Bugfix for hns3 PMD | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Min Hu (Connor) April 10, 2021, 1:11 a.m. UTC
This patch adds rollback processing when updating imissed
stats failed in PF init.

Fixes: 3e9f3042d7c8 ("net/hns3: add imissed packet stats")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 19e2eca..edace55 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -4991,7 +4991,7 @@  hns3_init_pf(struct rte_eth_dev *eth_dev)
 	ret = hns3_update_imissed_stats(hw, true);
 	if (ret) {
 		hns3_err(hw, "clear imissed stats failed, ret = %d", ret);
-		return ret;
+		goto err_cmd_init;
 	}
 
 	hns3_config_all_msix_error(hw, true);