diff options
author | Srinivas Kandagatla <srinivas.kandagatla@st.com> | 2012-04-02 02:25:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-03 19:02:00 -0400 |
commit | cc90cb3b2429a0f0681331fa5c501f91eee4f633 (patch) | |
tree | 72389fd02882c4fcb2bd1e83273f818b91d89e33 /drivers | |
parent | 8bc47ec6efd4d447f3502d9f9d41fe440cd5854d (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.c | 18 |
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 | ||
465 | static int m88e1118_config_aneg(struct phy_device *phydev) | 461 | static 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 | ||
525 | static int m88e1149_config_init(struct phy_device *phydev) | 517 | static 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 | ||
555 | static int m88e1145_config_init(struct phy_device *phydev) | 543 | static int m88e1145_config_init(struct phy_device *phydev) |