From: Srinivas Kandagatla Date: Mon, 2 Apr 2012 06:25:11 +0000 (+0000) Subject: net:phy:davicom: remove unnecessary code X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=8bc47ec6efd4d447f3502d9f9d41fe440cd5854d;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: David S. Miller --- 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) 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)