Fix one return value check problem found by the CI.

Coverity issue: 445519
Fixes: 08ea495d624b ("net/nfp: support loading firmware from flash")
Cc: sta...@dpdk.org

Signed-off-by: Chaoyong He <chaoyong...@corigine.com>
Reviewed-by: Peng Zhang <peng.zh...@corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index b16fbe7db7..812c48ff4c 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -1807,7 +1807,13 @@ nfp_enable_multi_pf(struct nfp_pf_dev *pf_dev)
        net_hw.tx_bar = pf_dev->qc_bar + tx_base * NFP_QCP_QUEUE_ADDR_SZ;
        nfp_net_cfg_queue_setup(&net_hw);
        rte_spinlock_init(&hw->reconfig_lock);
-       nfp_ext_reconfig(&net_hw.super, NFP_NET_CFG_CTRL_MULTI_PF, 
NFP_NET_CFG_UPDATE_GEN);
+       err = nfp_ext_reconfig(&net_hw.super, NFP_NET_CFG_CTRL_MULTI_PF,
+                       NFP_NET_CFG_UPDATE_GEN);
+       if (err != 0) {
+               PMD_INIT_LOG(ERR, "Configure multiple PF failed.");
+               goto end;
+       }
+
 end:
        nfp_cpp_area_release_free(area);
        return err;
-- 
2.39.1

Reply via email to