net/bnxt: fix stats errors handling
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Thu, 10 Oct 2019 01:41:42 +0000 (18:41 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Oct 2019 14:43:08 +0000 (16:43 +0200)
commit9f55e6ac7500e828d42e95100d5cb061e912be5c
tree7629ad1cbe9ca2602152584d03e90ddf295194c6
parentacd4818ea2a451fb35168b339739b23caae45f5c
net/bnxt: fix stats errors handling

This patch fixes few checks and few return values while getting
and clearing device statistics.

1. Fixed to return standard error code.
2. Clubbed few error checks
3. Removed an unnecessary return check

Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset")
Fixes: 88920136688c ("net/bnxt: support xstats get by id")
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