Commit c0e0e9f9 authored by Florian Fainelli's avatar Florian Fainelli Committed by Kleber Sacilotto de Souza

et131x: Fix logical vs bitwise check in et131x_tx_timeout()

BugLink: https://bugs.launchpad.net/bugs/1878232

commit de702da7 upstream.

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: 38df6492 ("et131x: Add PCIe gigabit ethernet driver et131x to drivers/net")
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 992a32a3
...@@ -3854,7 +3854,7 @@ static void et131x_tx_timeout(struct net_device *netdev) ...@@ -3854,7 +3854,7 @@ static void et131x_tx_timeout(struct net_device *netdev)
unsigned long flags; unsigned long flags;
/* If the device is closed, ignore the timeout */ /* 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; return;
/* Any nonrecoverable hardware error? /* Any nonrecoverable hardware error?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment