From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, Florian Fainelli <f.fainelli@gmail.com>,
Mark Einon <mark.einon@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
Antonio Quartulli <a@unstable.cc>,
Felipe Balbi <felipe.balbi@linux.intel.com>,
Florian Westphal <fw@strlen.de>, Insu Yun <wuninsu@gmail.com>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH net] et131x: Fix logical vs bitwise check in et131x_tx_timeout()
Date: Fri, 15 Jul 2016 16:40:22 -0700 [thread overview]
Message-ID: <1468626024-31534-1-git-send-email-f.fainelli@gmail.com> (raw)
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>
---
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
next reply other threads:[~2016-07-15 23:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-15 23:40 Florian Fainelli [this message]
2016-07-17 5:04 ` [PATCH net] et131x: Fix logical vs bitwise check in et131x_tx_timeout() David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1468626024-31534-1-git-send-email-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=a@unstable.cc \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=felipe.balbi@linux.intel.com \
--cc=fw@strlen.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.einon@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=wuninsu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).