net/bnxt: fix crash in xstats get
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Wed, 13 Nov 2019 08:29:43 +0000 (13:59 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 20 Nov 2019 16:36:05 +0000 (17:36 +0100)
commit063e59ddd28e3a147107366ddba9fb8baeeebc31
tree7a78e6157bbafcfc1ab29f3413473460b44833ac
parentfcdd7210aa1f211b5ab1c45c59bf23be6da27073
net/bnxt: fix crash in xstats get

We would hit a segfault in bnxt_dev_xstats_get_op() if xstats argument
is NULL, Check if the argument is NULL and return appropriately.

Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
drivers/net/bnxt/bnxt_stats.c