diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-03-23 14:36:15 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-26 04:14:03 +0300 |
commit | 050e85c97f6151be1689a22810a7240fa7457557 (patch) | |
tree | 3131be22e04511e146a502d4d1e65f874c766d77 /drivers/net | |
parent | 0f1417f9f0ed3f367502011b187a293cea0e2435 (diff) | |
download | linux-050e85c97f6151be1689a22810a7240fa7457557.tar.xz |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.c | 2 |
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; |