OSDN Git Service

tulip: Remove deadcode on startup true condition
authorColin Ian King <colin.king@canonical.com>
Fri, 6 Aug 2021 12:49:32 +0000 (13:49 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Aug 2021 08:39:54 +0000 (09:39 +0100)
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>
drivers/net/ethernet/dec/tulip/media.c

index 0116047..55d6fc9 100644 (file)
@@ -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;