summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-08-06 13:49:32 +0100
committerDavid S. Miller <davem@davemloft.net>2021-08-07 09:39:54 +0100
commit17bd3a1e10615b7a790faf5ff4cd87401d447e7c (patch)
tree0bff09c1c33f0db605813a3adad3285a57191da8
parent35ba6abb73e4d2ba21a566d3671618f4a5503c27 (diff)
downloadlinux-stable-17bd3a1e10615b7a790faf5ff4cd87401d447e7c.tar.gz
linux-stable-17bd3a1e10615b7a790faf5ff4cd87401d447e7c.tar.bz2
linux-stable-17bd3a1e10615b7a790faf5ff4cd87401d447e7c.zip
tulip: Remove deadcode on startup true condition
The true check on the variable startable in the ternary operator is always false because the previous if statement handles the true condition for startable. Hence the ternary check is dead code and can be removed. Addresses-Coverity: ("Logically dead code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/dec/tulip/media.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/dec/tulip/media.c b/drivers/net/ethernet/dec/tulip/media.c
index 011604787b8e..55d6fc99f40b 100644
--- a/drivers/net/ethernet/dec/tulip/media.c
+++ b/drivers/net/ethernet/dec/tulip/media.c
@@ -362,7 +362,7 @@ void tulip_select_media(struct net_device *dev, int startup)
iowrite32(0x33, ioaddr + CSR12);
new_csr6 = 0x01860000;
/* Trigger autonegotiation. */
- iowrite32(startup ? 0x0201F868 : 0x0001F868, ioaddr + 0xB8);
+ iowrite32(0x0001F868, ioaddr + 0xB8);
} else {
iowrite32(0x32, ioaddr + CSR12);
new_csr6 = 0x00420000;