net/nfp: fix two bugs of error process logic

Message ID 20250226030605.567179-1-chaoyong.he@corigine.com (mailing list archive)
State Accepted, archived
Delegated to: Stephen Hemminger
Headers
Series net/nfp: fix two bugs of error process logic |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS

Commit Message

Chaoyong He Feb. 26, 2025, 3:06 a.m. UTC
Fix two bugs of error process logic.

Fixes: 19bd7cce5705 ("net/nfp: support different configuration BAR size")
Fixes: 636e133ec891 ("net/nfp: update Tx and Rx for multiple PF")
Cc: peng.zhang@corigine.com
Cc: stable@dpdk.org

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index b9cb9fc652..cbd1deffb4 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -2549,7 +2549,7 @@  nfp_pf_init(struct rte_pci_device *pci_dev)
 	ret = nfp_net_vf_config_init(pf_dev);
 	if (ret != 0) {
 		PMD_INIT_LOG(ERR, "Failed to init VF config.");
-		goto vf_cfg_tbl_cleanup;
+		goto mac_stats_cleanup;
 	}
 
 	hw_priv->is_pf = true;
@@ -2557,7 +2557,7 @@  nfp_pf_init(struct rte_pci_device *pci_dev)
 	if (!nfp_net_recv_pkt_meta_check_register(hw_priv)) {
 		PMD_INIT_LOG(ERR, "PF register meta check function failed.");
 		ret = -EIO;
-		goto hw_priv_free;
+		goto vf_cfg_tbl_cleanup;
 	}
 
 	/*