net: ethernet: sun: remove redundant assignment to variable err
authorColin Ian King <colin.king@canonical.com>
Thu, 4 Jul 2019 12:36:51 +0000 (13:36 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Jul 2019 19:12:13 +0000 (12:12 -0700)
The variable err is being assigned with a value that is never
read and it is being updated in the next statement with a new value.
The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/niu.c

index 6f99437a696203849344de81e381c7839ca4c0ee..0bc5863bffeb41b2bab9519b45bf73ce2d17c12e 100644 (file)
@@ -1217,8 +1217,6 @@ static int link_status_1g_rgmii(struct niu *np, int *link_up_p)
 
        spin_lock_irqsave(&np->lock, flags);
 
-       err = -EINVAL;
-
        err = mii_read(np, np->phy_addr, MII_BMSR);
        if (err < 0)
                goto out;