Skip to content

Commit

Permalink
net:phy:davicom: remove unnecessary code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Srinivas Kandagatla authored and David S. Miller committed Apr 3, 2012
1 parent a25cc43 commit 8bc47ec
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/net/phy/davicom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8bc47ec

Please sign in to comment.