mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-19 09:04:51 +08:00
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>
This commit is contained in:
parent
485b777855
commit
04e6233d57
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user