dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Srinivas Kandagatla 2012-04-02 06:25:11 +00:00 committed by David S. Miller
parent a25cc43ebb
commit 8bc47ec6ef
1 changed files with 1 additions and 6 deletions

View File

@ -134,12 +134,7 @@ static int dm9161_config_init(struct phy_device *phydev)
return err;
/* Reconnect the PHY, and enable Autonegotiation */
err = phy_write(phydev, MII_BMCR, BMCR_ANENABLE);
if (err < 0)
return err;
return 0;
return phy_write(phydev, MII_BMCR, BMCR_ANENABLE);
}
static int dm9161_ack_interrupt(struct phy_device *phydev)