Skip to content

Commit

Permalink
net:phy:bcm63xx: 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 9942774 commit a25cc43
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/phy/bcm63xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ static int bcm63xx_config_init(struct phy_device *phydev)
MII_BCM63XX_IR_SPEED |
MII_BCM63XX_IR_LINK) |
MII_BCM63XX_IR_EN;
err = phy_write(phydev, MII_BCM63XX_IR, reg);
if (err < 0)
return err;
return 0;
return phy_write(phydev, MII_BCM63XX_IR, reg);
}

static int bcm63xx_ack_interrupt(struct phy_device *phydev)
Expand Down

0 comments on commit a25cc43

Please sign in to comment.