lxt: simplify lxt97[01]_config_intr()
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Fri, 13 May 2016 23:08:02 +0000 (16:08 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 May 2016 17:53:19 +0000 (13:53 -0400)
Both these functions declare the 'err' local variables for no good reason,
get rid of them.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/lxt.c

index f6078376ef500f286364e40c0c10bc70ecb3358a..89b2c0fd69b90ae0a19499a510000f759132177c 100644 (file)
@@ -80,14 +80,10 @@ static int lxt970_ack_interrupt(struct phy_device *phydev)
 
 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 phy_device *phydev)
 
 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);
 }
 
 /*