projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lxt: simplify lxt97[01]_config_intr()
[cascardo/linux.git]
/
drivers
/
net
/
phy
/
lxt.c
diff --git
a/drivers/net/phy/lxt.c
b/drivers/net/phy/lxt.c
index
f607837
..
89b2c0f
100644
(file)
--- 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)
{
static int lxt970_config_intr(struct phy_device *phydev)
{
- int err;
-
if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
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
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)
}
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)
{
static int lxt971_config_intr(struct phy_device *phydev)
{
- int err;
-
if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
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
else
- err = phy_write(phydev, MII_LXT971_IER, 0);
-
- return err;
+ return phy_write(phydev, MII_LXT971_IER, 0);
}
/*
}
/*