bnx2x: Fix static checker warning regarding `txdata_ptr'
Incorrect checking of array instead of array contents in panic_dump
flow - results of commit e261199872 ("bnx2x: Safe bnx2x_panic_dump()").
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
b0b46c7766
commit
1fc3de9407
@@ -985,7 +985,7 @@ void bnx2x_panic_dump(struct bnx2x *bp, bool disable_int)
|
|||||||
/* Tx */
|
/* Tx */
|
||||||
for_each_cos_in_tx_queue(fp, cos)
|
for_each_cos_in_tx_queue(fp, cos)
|
||||||
{
|
{
|
||||||
if (!fp->txdata_ptr)
|
if (!fp->txdata_ptr[cos])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
txdata = *fp->txdata_ptr[cos];
|
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) {
|
for_each_cos_in_tx_queue(fp, cos) {
|
||||||
struct bnx2x_fp_txdata *txdata = fp->txdata_ptr[cos];
|
struct bnx2x_fp_txdata *txdata = fp->txdata_ptr[cos];
|
||||||
|
|
||||||
if (!fp->txdata_ptr)
|
if (!fp->txdata_ptr[cos])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (!txdata->tx_cons_sb)
|
if (!txdata->tx_cons_sb)
|
||||||
|
|||||||
Reference in New Issue
Block a user