[7/7] net/bnxt: fix error handling
diff mbox series

Message ID 20191014000120.3020-8-ajit.khaparde@broadcom.com
State Accepted, archived
Headers show
  • patchset for bnxt
Related show


Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ajit Khaparde Oct. 14, 2019, 12:01 a.m. UTC
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

Add missing return instead of setting the error status in case of error.

Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
 drivers/net/bnxt/bnxt_stats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff mbox series

diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index f486a5634b..fa29f9de19 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -575,7 +575,7 @@  int bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth_dev)
 	if (BNXT_VF(bp) || !BNXT_SINGLE_PF(bp) ||
 	    !(bp->flags & BNXT_FLAG_PORT_STATS)) {
 		PMD_DRV_LOG(ERR, "Operation not supported\n");
-		ret = -ENOTSUP;
+		return -ENOTSUP;
 	ret = bnxt_hwrm_port_clr_stats(bp);