aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@st.com>2012-04-02 02:25:24 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-03 19:02:00 -0400
commitcc90cb3b2429a0f0681331fa5c501f91eee4f633 (patch)
tree72389fd02882c4fcb2bd1e83273f818b91d89e33 /drivers
parent8bc47ec6efd4d447f3502d9f9d41fe440cd5854d (diff)
net:phy:marvell: 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/marvell.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index e8b9c53c304b..418928d644bf 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -455,11 +455,7 @@ static int m88e1111_config_init(struct phy_device *phydev)
455 if (err < 0) 455 if (err < 0)
456 return err; 456 return err;
457 457
458 err = phy_write(phydev, MII_BMCR, BMCR_RESET); 458 return phy_write(phydev, MII_BMCR, BMCR_RESET);
459 if (err < 0)
460 return err;
461
462 return 0;
463} 459}
464 460
465static int m88e1118_config_aneg(struct phy_device *phydev) 461static int m88e1118_config_aneg(struct phy_device *phydev)
@@ -515,11 +511,7 @@ static int m88e1118_config_init(struct phy_device *phydev)
515 if (err < 0) 511 if (err < 0)
516 return err; 512 return err;
517 513
518 err = phy_write(phydev, MII_BMCR, BMCR_RESET); 514 return phy_write(phydev, MII_BMCR, BMCR_RESET);
519 if (err < 0)
520 return err;
521
522 return 0;
523} 515}
524 516
525static int m88e1149_config_init(struct phy_device *phydev) 517static int m88e1149_config_init(struct phy_device *phydev)
@@ -545,11 +537,7 @@ static int m88e1149_config_init(struct phy_device *phydev)
545 if (err < 0) 537 if (err < 0)
546 return err; 538 return err;
547 539
548 err = phy_write(phydev, MII_BMCR, BMCR_RESET); 540 return phy_write(phydev, MII_BMCR, BMCR_RESET);
549 if (err < 0)
550 return err;
551
552 return 0;
553} 541}
554 542
555static int m88e1145_config_init(struct phy_device *phydev) 543static int m88e1145_config_init(struct phy_device *phydev)