diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2016-05-13 19:08:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-16 13:53:19 -0400 |
commit | 04e6233d57a9e68e97c248f97d1aa2cb354f3947 (patch) | |
tree | 673d2ee53e64e65203388e5b1ffd11d18ad838b3 /drivers/net/phy | |
parent | 485b777855ed74dfcde5c46cfc88e2bc1b7c0714 (diff) |
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) | |||
80 | 80 | ||
81 | static int lxt970_config_intr(struct phy_device *phydev) | 81 | static int lxt970_config_intr(struct phy_device *phydev) |
82 | { | 82 | { |
83 | int err; | ||
84 | |||
85 | if (phydev->interrupts == PHY_INTERRUPT_ENABLED) | 83 | if (phydev->interrupts == PHY_INTERRUPT_ENABLED) |
86 | err = phy_write(phydev, MII_LXT970_IER, MII_LXT970_IER_IEN); | 84 | return phy_write(phydev, MII_LXT970_IER, MII_LXT970_IER_IEN); |
87 | else | 85 | else |
88 | err = phy_write(phydev, MII_LXT970_IER, 0); | 86 | return phy_write(phydev, MII_LXT970_IER, 0); |
89 | |||
90 | return err; | ||
91 | } | 87 | } |
92 | 88 | ||
93 | static int lxt970_config_init(struct phy_device *phydev) | 89 | static int lxt970_config_init(struct phy_device *phydev) |
@@ -112,14 +108,10 @@ static int lxt971_ack_interrupt(struct phy_device *phydev) | |||
112 | 108 | ||
113 | static int lxt971_config_intr(struct phy_device *phydev) | 109 | static int lxt971_config_intr(struct phy_device *phydev) |
114 | { | 110 | { |
115 | int err; | ||
116 | |||
117 | if (phydev->interrupts == PHY_INTERRUPT_ENABLED) | 111 | if (phydev->interrupts == PHY_INTERRUPT_ENABLED) |
118 | err = phy_write(phydev, MII_LXT971_IER, MII_LXT971_IER_IEN); | 112 | return phy_write(phydev, MII_LXT971_IER, MII_LXT971_IER_IEN); |
119 | else | 113 | else |
120 | err = phy_write(phydev, MII_LXT971_IER, 0); | 114 | return phy_write(phydev, MII_LXT971_IER, 0); |
121 | |||
122 | return err; | ||
123 | } | 115 | } |
124 | 116 | ||
125 | /* | 117 | /* |