summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/lxt.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2016-05-13 16:08:02 -0700
committerDavid S. Miller <davem@davemloft.net>2016-05-16 13:53:19 -0400
commit04e6233d57a9e68e97c248f97d1aa2cb354f3947 (patch)
tree673d2ee53e64e65203388e5b1ffd11d18ad838b3 /drivers/net/phy/lxt.c
parent485b777855ed74dfcde5c46cfc88e2bc1b7c0714 (diff)
downloadop-kernel-dev-04e6233d57a9e68e97c248f97d1aa2cb354f3947.zip
op-kernel-dev-04e6233d57a9e68e97c248f97d1aa2cb354f3947.tar.gz
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/lxt.c')
-rw-r--r--drivers/net/phy/lxt.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c
index f607837..89b2c0f 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);
}
/*
OpenPOWER on IntegriCloud