net/bnxt: avoid null pointer dereference
authorLance Richardson <lance.richardson@broadcom.com>
Wed, 17 Jul 2019 10:41:34 +0000 (16:11 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 23 Jul 2019 12:31:35 +0000 (14:31 +0200)
commitee07b4ac65872dd8e1ab094a09d7b280a2e0fd6b
tree404a66b5e747d8d4e3027ff7c3471e4626d5b991
parent4af9d0c729414670ffc152d7516e54f0e2e22b85
net/bnxt: avoid null pointer dereference

Avoid null pointer dereference when allocating an insulated
completion ring by basing nq ring allocation on whether an
nq ring was requested instead of whether the device supports
nq rings.

Fixes: f8168ca0e690 ("net/bnxt: support thor controller")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_ring.c