diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2016-05-14 02:08:02 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-16 20:53:19 +0300 |
commit | 04e6233d57a9e68e97c248f97d1aa2cb354f3947 (patch) | |
tree | 673d2ee53e64e65203388e5b1ffd11d18ad838b3 /drivers/net/phy | |
parent | 485b777855ed74dfcde5c46cfc88e2bc1b7c0714 (diff) | |
download | linux-04e6233d57a9e68e97c248f97d1aa2cb354f3947.tar.xz |
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 <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/lxt.c | 16 |
1 files changed, 4 insertions, 12 deletions
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); } /* |