From 9b96a3e6dd4bf3b92df15798f088ee6b35928712 Mon Sep 17 00:00:00 2001 From: Chen Zhou Date: Wed, 11 Mar 2020 14:54:11 +0800 Subject: [PATCH] net: ibm: remove set but not used variables 'err' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/ibm/emac/core.c: In function __emac_mdio_write: drivers/net/ethernet/ibm/emac/core.c:875:9: warning: variable err set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: Chen Zhou Signed-off-by: David S. Miller --- drivers/net/ethernet/ibm/emac/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c index b7fc17756c51..06248a7db7f2 100644 --- a/drivers/net/ethernet/ibm/emac/core.c +++ b/drivers/net/ethernet/ibm/emac/core.c @@ -872,7 +872,7 @@ static void __emac_mdio_write(struct emac_instance *dev, u8 id, u8 reg, { struct emac_regs __iomem *p = dev->emacp; u32 r = 0; - int n, err = -ETIMEDOUT; + int n; mutex_lock(&dev->mdio_lock); @@ -919,7 +919,6 @@ static void __emac_mdio_write(struct emac_instance *dev, u8 id, u8 reg, goto bail; } } - err = 0; bail: if (emac_has_feature(dev, EMAC_FTR_HAS_RGMII)) rgmii_put_mdio(dev->rgmii_dev, dev->rgmii_port);