aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuval Mintz <Yuval.Mintz@qlogic.com>2014-08-26 03:24:41 -0400
committerDavid S. Miller <davem@davemloft.net>2014-08-27 19:28:46 -0400
commit1fc3de94076cd0c1e53e5ba8061763b33c7b27c2 (patch)
treed3959b62ea7f89e2e74ea9004dd2eaf7c2577c74
parentb0b46c7766e6803df7f76cddbbc0172092b5fa7c (diff)
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 <dan.carpenter@oracle.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c4
1 files changed, 2 insertions, 2 deletions
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)
985 /* Tx */ 985 /* Tx */
986 for_each_cos_in_tx_queue(fp, cos) 986 for_each_cos_in_tx_queue(fp, cos)
987 { 987 {
988 if (!fp->txdata_ptr) 988 if (!fp->txdata_ptr[cos])
989 break; 989 break;
990 990
991 txdata = *fp->txdata_ptr[cos]; 991 txdata = *fp->txdata_ptr[cos];
@@ -1140,7 +1140,7 @@ void bnx2x_panic_dump(struct bnx2x *bp, bool disable_int)
1140 for_each_cos_in_tx_queue(fp, cos) { 1140 for_each_cos_in_tx_queue(fp, cos) {
1141 struct bnx2x_fp_txdata *txdata = fp->txdata_ptr[cos]; 1141 struct bnx2x_fp_txdata *txdata = fp->txdata_ptr[cos];
1142 1142
1143 if (!fp->txdata_ptr) 1143 if (!fp->txdata_ptr[cos])
1144 break; 1144 break;
1145 1145
1146 if (!txdata->tx_cons_sb) 1146 if (!txdata->tx_cons_sb)