* [PATCH 1/2] net/nfp: fix return value of nfp card init function
[not found] <20220922130314.694790-1-niklas.soderlund@corigine.com>
@ 2022-09-22 13:03 ` Niklas Söderlund
0 siblings, 0 replies; only message in thread
From: Niklas Söderlund @ 2022-09-22 13:03 UTC (permalink / raw)
To: dev; +Cc: oss-drivers, Jin Liu, Chaoyong He, stable, Niklas Söderlund
From: Jin Liu <jin.liu@corigine.com>
The return value of 'nfp_pf_init' function is variable ret, but
there is one statement, if error occurs, assign error num to
variable err, it is incorrect, fixed it.
Fixes: 5c464d6a2771 ("net/nfp: support NFP3800 card")
Cc: stable@dpdk.org
Signed-off-by: Jin Liu <jin.liu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
drivers/net/nfp/nfp_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 2e546cfc5ffc..bc69840777eb 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -924,7 +924,7 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
break;
default:
PMD_INIT_LOG(ERR, "nfp_net: no device ID matching");
- err = -ENODEV;
+ ret = -ENODEV;
goto ctrl_area_cleanup;
}
--
2.37.3
^ permalink raw reply [flat|nested] only message in thread