1
0
Fork 0

ibmvnic: Potential NULL dereference in clean_one_tx_pool()

There is an && vs || typo here, which potentially leads to a NULL
dereference.

Fixes: e9e1e97884 ("ibmvnic: Update TX pool cleaning routine")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
hifive-unleashed-5.1
Dan Carpenter 2018-03-23 14:36:15 +03:00 committed by David S. Miller
parent 0f1417f9f0
commit 050e85c97f
1 changed files with 1 additions and 1 deletions

View File

@ -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;