Skip to content

Commit 050e85c

Browse files
Dan Carpenterdavem330
authored andcommitted
ibmvnic: Potential NULL dereference in clean_one_tx_pool()
There is an && vs || typo here, which potentially leads to a NULL dereference. Fixes: e9e1e97 ("ibmvnic: Update TX pool cleaning routine") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0f1417f commit 050e85c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ static void clean_one_tx_pool(struct ibmvnic_adapter *adapter,
11351135
u64 tx_entries;
11361136
int i;
11371137

1138-
if (!tx_pool && !tx_pool->tx_buff)
1138+
if (!tx_pool || !tx_pool->tx_buff)
11391139
return;
11401140

11411141
tx_entries = tx_pool->num_buffers;

0 commit comments

Comments
 (0)