From: Somnath Kotur Date: Sat, 8 Jun 2019 19:22:04 +0000 (+0400) Subject: net/bnxt: check for null completion ring doorbell X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=2807c5861e31b99295b915b28e121ce059a46416 net/bnxt: check for null completion ring doorbell It is observed that sometimes during init, the bnxt_int_handler() gets invoked while the cpr->cp_db.doorbell is not yet initialized. Check for the same and return. Fixes: f7ecea911ec5 ("net/bnxt: fix interrupt handler") Cc: stable@dpdk.org Signed-off-by: Somnath Kotur Signed-off-by: Kalesh AP Signed-off-by: Ajit Khaparde --- diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c index 918f3dcf48..0bb3eb4faf 100644 --- a/drivers/net/bnxt/bnxt_irq.c +++ b/drivers/net/bnxt/bnxt_irq.c @@ -31,7 +31,7 @@ static void bnxt_int_handler(void *param) raw_cons = cpr->cp_raw_cons; while (1) { - if (!cpr || !cpr->cp_ring_struct) + if (!cpr || !cpr->cp_ring_struct || !cpr->cp_db.doorbell) return; cons = RING_CMP(cpr->cp_ring_struct, raw_cons);