]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
net: dl2k: remove redundant re-assignment to np
authorColin Ian King <colin.king@canonical.com>
Wed, 1 Nov 2017 08:57:37 +0000 (08:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Nov 2017 06:52:19 +0000 (15:52 +0900)
The pointer np is initialized and then re-assigned the same value
a few lines later. Remove the redundant duplicated assignment. Cleans
up clang warning:

drivers/net/ethernet/dlink/dl2k.c:314:25: warning: Value stored to
'np' during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/dlink/dl2k.c

index a2f6758d38ddc01d90e44be9b22fc14ce11d929a..f0536b16b3c3cbca46b190a2bf2f67b459888ea9 100644 (file)
@@ -313,7 +313,7 @@ find_miiphy (struct net_device *dev)
 {
        struct netdev_private *np = netdev_priv(dev);
        int i, phy_found = 0;
-       np = netdev_priv(dev);
+
        np->phy_addr = 1;
 
        for (i = 31; i >= 0; i--) {