[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1468626024-31534-1-git-send-email-f.fainelli@gmail.com>
Date: Fri, 15 Jul 2016 16:40:22 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, Florian Fainelli <f.fainelli@...il.com>,
Mark Einon <mark.einon@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Antonio Quartulli <a@...table.cc>,
Felipe Balbi <felipe.balbi@...ux.intel.com>,
Florian Westphal <fw@...len.de>, Insu Yun <wuninsu@...il.com>,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH net] 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@...il.com>
---
drivers/net/ethernet/agere/et131x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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?
--
2.7.4
Powered by blists - more mailing lists