Skip to content

Commit

Permalink
et131x: Fix logical vs bitwise check in et131x_tx_timeout()
Browse files Browse the repository at this point in the history
We should be using a logical check here instead of a bitwise operation
to check if the device is closed already in et131x_tx_timeout().

Reported-by: coverity (CID 146498)
Fixes: 38df649 ("et131x: Add PCIe gigabit ethernet driver et131x to drivers/net")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Jul 17, 2016
1 parent 18d3df3 commit de702da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/agere/et131x.c
Original file line number Diff line number Diff line change
Expand Up @@ -3851,7 +3851,7 @@ static void et131x_tx_timeout(struct net_device *netdev)
unsigned long flags;

/* If the device is closed, ignore the timeout */
if (~(adapter->flags & FMP_ADAPTER_INTERRUPT_IN_USE))
if (!(adapter->flags & FMP_ADAPTER_INTERRUPT_IN_USE))
return;

/* Any nonrecoverable hardware error?
Expand Down

0 comments on commit de702da

Please sign in to comment.