net/bnxt: fix error handling in xstats
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Fri, 11 Oct 2019 05:16:44 +0000 (10:46 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Oct 2019 14:43:09 +0000 (16:43 +0200)
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

index f486a56..fa29f9d 100644 (file)
@@ -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);