net:phy:bcm63xx: remove unnecessary code
authorSrinivas Kandagatla <srinivas.kandagatla@st.com>
Mon, 2 Apr 2012 06:24:55 +0000 (06:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Apr 2012 23:02:00 +0000 (19:02 -0400)
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>
drivers/net/phy/bcm63xx.c

index e16f98cb4f04733c962aa9219d407c3066a4ef64..cd802eb25fd2f898de3e566d410d1656d5b68d33 100644 (file)
@@ -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)