Both these functions declare the 'err' local variables for no good reason,
get rid of them.

Signed-off-by: Sergei Shtylyov <sergei.shtyl...@cogentembedded.com>

---
 drivers/net/phy/lxt.c |   16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

Index: net-next/drivers/net/phy/lxt.c
===================================================================
--- net-next.orig/drivers/net/phy/lxt.c
+++ net-next/drivers/net/phy/lxt.c
@@ -80,14 +80,10 @@ static int lxt970_ack_interrupt(struct p
 
 static int lxt970_config_intr(struct phy_device *phydev)
 {
-       int err;
-
        if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
-               err = phy_write(phydev, MII_LXT970_IER, MII_LXT970_IER_IEN);
+               return phy_write(phydev, MII_LXT970_IER, MII_LXT970_IER_IEN);
        else
-               err = phy_write(phydev, MII_LXT970_IER, 0);
-
-       return err;
+               return phy_write(phydev, MII_LXT970_IER, 0);
 }
 
 static int lxt970_config_init(struct phy_device *phydev)
@@ -112,14 +108,10 @@ static int lxt971_ack_interrupt(struct p
 
 static int lxt971_config_intr(struct phy_device *phydev)
 {
-       int err;
-
        if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
-               err = phy_write(phydev, MII_LXT971_IER, MII_LXT971_IER_IEN);
+               return phy_write(phydev, MII_LXT971_IER, MII_LXT971_IER_IEN);
        else
-               err = phy_write(phydev, MII_LXT971_IER, 0);
-
-       return err;
+               return phy_write(phydev, MII_LXT971_IER, 0);
 }
 
 /*

Reply via email to