From 9bc556e3ecec6c1127c6d6c99660742315c59282 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Fri, 11 Oct 2019 10:46:44 +0530 Subject: [PATCH] net/bnxt: fix error handling in xstats 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 Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.20.1