summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-03-23 14:36:15 +0300
committerDavid S. Miller <davem@davemloft.net>2018-03-25 21:14:03 -0400
commit050e85c97f6151be1689a22810a7240fa7457557 (patch)
tree3131be22e04511e146a502d4d1e65f874c766d77
parent0f1417f9f0ed3f367502011b187a293cea0e2435 (diff)
downloadblackbird-op-linux-050e85c97f6151be1689a22810a7240fa7457557.tar.gz
blackbird-op-linux-050e85c97f6151be1689a22810a7240fa7457557.zip
ibmvnic: Potential NULL dereference in clean_one_tx_pool()
There is an && vs || typo here, which potentially leads to a NULL dereference. Fixes: e9e1e97884b7 ("ibmvnic: Update TX pool cleaning routine") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 5632c030811b..0389a7a52152 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1135,7 +1135,7 @@ static void clean_one_tx_pool(struct ibmvnic_adapter *adapter,
u64 tx_entries;
int i;
- if (!tx_pool && !tx_pool->tx_buff)
+ if (!tx_pool || !tx_pool->tx_buff)
return;
tx_entries = tx_pool->num_buffers;
OpenPOWER on IntegriCloud