aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@st.com>2012-04-02 02:25:11 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-03 19:02:00 -0400
commit8bc47ec6efd4d447f3502d9f9d41fe440cd5854d (patch)
treedd55998070d2e8b482fb09dd239d392b01016d5c /drivers/net/phy
parenta25cc43ebb9cdf1cd9623fcdf5009e0a72288f69 (diff)
net:phy:davicom: remove unnecessary code
Compile tested. remove unnecessary code that matches this coccinelle pattern ret = phy_write(x, y , z) if (ret < 0) return ret; return 0; As phy_write returns error code, we dont need to do not need extra check before returning. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/davicom.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/phy/davicom.c b/drivers/net/phy/davicom.c
index 2f774acdb551..5f59cc064778 100644
--- a/drivers/net/phy/davicom.c
+++ b/drivers/net/phy/davicom.c
@@ -134,12 +134,7 @@ static int dm9161_config_init(struct phy_device *phydev)
134 return err; 134 return err;
135 135
136 /* Reconnect the PHY, and enable Autonegotiation */ 136 /* Reconnect the PHY, and enable Autonegotiation */
137 err = phy_write(phydev, MII_BMCR, BMCR_ANENABLE); 137 return phy_write(phydev, MII_BMCR, BMCR_ANENABLE);
138
139 if (err < 0)
140 return err;
141
142 return 0;
143} 138}
144 139
145static int dm9161_ack_interrupt(struct phy_device *phydev) 140static int dm9161_ack_interrupt(struct phy_device *phydev)