From: Sergei Shtylyov Date: Fri, 13 May 2016 23:08:02 +0000 (-0700) Subject: lxt: simplify lxt97[01]_config_intr() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=04e6233d57a9e68e97c248f97d1aa2cb354f3947;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git lxt: simplify lxt97[01]_config_intr() Both these functions declare the 'err' local variables for no good reason, get rid of them. Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c index f6078376ef50..89b2c0fd69b9 100644 --- a/drivers/net/phy/lxt.c +++ b/drivers/net/phy/lxt.c @@ -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); } /*