summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sun/niu.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-07-04 14:36:51 +0200
committerDavid S. Miller <davem@davemloft.net>2019-07-04 21:12:13 +0200
commit2368a870d6408d8a834ebb2b9f1576144c96a78f (patch)
treea73ddcfa6eaef20c4e2712e8476d05997a0df064 /drivers/net/ethernet/sun/niu.c
parentgve: fix -ENOMEM null check on a page allocation (diff)
downloadlinux-2368a870d6408d8a834ebb2b9f1576144c96a78f.tar.xz
linux-2368a870d6408d8a834ebb2b9f1576144c96a78f.zip
net: ethernet: sun: remove redundant assignment to variable err
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>
Diffstat (limited to 'drivers/net/ethernet/sun/niu.c')
-rw-r--r--drivers/net/ethernet/sun/niu.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index 6f99437a6962..0bc5863bffeb 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -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;