From: Kalesh AP Date: Fri, 11 Oct 2019 05:16:44 +0000 (+0530) Subject: net/bnxt: fix error handling in xstats X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9bc556e3ecec6c1127c6d6c99660742315c59282;p=dpdk.git 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 --- 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);