summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/agere/et131x.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2016-07-16 01:40:22 +0200
committerDavid S. Miller <davem@davemloft.net>2016-07-17 07:04:19 +0200
commitde702da7a823ab0c4a1e53ed79a2695f0d453855 (patch)
tree1cbcd7b697128888ed29859c7e9b66a838cda93f /drivers/net/ethernet/agere/et131x.c
parentvlan: use a valid default mtu value for vlan over macsec (diff)
downloadlinux-de702da7a823ab0c4a1e53ed79a2695f0d453855.tar.xz
linux-de702da7a823ab0c4a1e53ed79a2695f0d453855.zip
et131x: Fix logical vs bitwise check in et131x_tx_timeout()
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: 38df6492eb511 ("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>
Diffstat (limited to 'drivers/net/ethernet/agere/et131x.c')
-rw-r--r--drivers/net/ethernet/agere/et131x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/agere/et131x.c b/drivers/net/ethernet/agere/et131x.c
index 30defe6c81f2..821d86c38ab2 100644
--- a/drivers/net/ethernet/agere/et131x.c
+++ b/drivers/net/ethernet/agere/et131x.c
@@ -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?