net/bnxt: fix null dereference in Rx stop
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Wed, 13 Nov 2019 08:29:45 +0000 (13:59 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 20 Nov 2019 16:36:05 +0000 (17:36 +0100)
commite92247f03bc74802c5df9d9b6499dec7b19785e0
tree3b291f44c9bcf16af39f0243eb93e8a03abe43c4
parentae6a941dd9be62a783a8d4e1bafa5df894401936
net/bnxt: fix null dereference in Rx stop

Null-checking "rxq" suggests that it may be null, but it has already
been dereferenced on all paths leading to the check.
Refactored the code to address this issue.

Coverity issue: 350594
Fixes: fc4bfea59696 ("net/bnxt: fix Rx queue start/stop for Thor based NICs")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
drivers/net/bnxt/bnxt_rxq.c