From: Yuval Mintz Date: Tue, 26 Aug 2014 07:24:41 +0000 (+0300) Subject: bnx2x: Fix static checker warning regarding `txdata_ptr' X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1fc3de94076cd0c1e53e5ba8061763b33c7b27c2;p=linux-beck.git bnx2x: Fix static checker warning regarding `txdata_ptr' Incorrect checking of array instead of array contents in panic_dump flow - results of commit e261199872a2 ("bnx2x: Safe bnx2x_panic_dump()"). Reported-by: Dan Carpenter Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 2f394b82ca02..93132d8fec67 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -985,7 +985,7 @@ void bnx2x_panic_dump(struct bnx2x *bp, bool disable_int) /* Tx */ for_each_cos_in_tx_queue(fp, cos) { - if (!fp->txdata_ptr) + if (!fp->txdata_ptr[cos]) break; txdata = *fp->txdata_ptr[cos]; @@ -1140,7 +1140,7 @@ void bnx2x_panic_dump(struct bnx2x *bp, bool disable_int) for_each_cos_in_tx_queue(fp, cos) { struct bnx2x_fp_txdata *txdata = fp->txdata_ptr[cos]; - if (!fp->txdata_ptr) + if (!fp->txdata_ptr[cos]) break; if (!txdata->tx_cons_sb)