Commit 050e85c9 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

ibmvnic: Potential NULL dereference in clean_one_tx_pool()

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

Fixes: e9e1e978 ("ibmvnic: Update TX pool cleaning routine")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0f1417f9
...@@ -1135,7 +1135,7 @@ static void clean_one_tx_pool(struct ibmvnic_adapter *adapter, ...@@ -1135,7 +1135,7 @@ static void clean_one_tx_pool(struct ibmvnic_adapter *adapter,
u64 tx_entries; u64 tx_entries;
int i; int i;
if (!tx_pool && !tx_pool->tx_buff) if (!tx_pool || !tx_pool->tx_buff)
return; return;
tx_entries = tx_pool->num_buffers; tx_entries = tx_pool->num_buffers;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment