[PATCH] net: icplus: remove unnecessary code

Subsystems: ethernet phy library, networking drivers, the rest

STALE5524d

2 messages, 2 authors, 2011-06-17 · open the first message on its own page

[PATCH] net: icplus: remove unnecessary code

From: Greg Dietsche <hidden>
Date: 2011-06-16 17:04:48

Compile tested.
remove unnecessary code that matches this coccinelle pattern
	if (...)
		return ret;
	return ret;

Signed-off-by: Greg Dietsche <redacted>
---
 drivers/net/phy/icplus.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c
index 9a09e24..d4cbc29 100644
--- a/drivers/net/phy/icplus.c
+++ b/drivers/net/phy/icplus.c
@@ -109,11 +109,7 @@ static int ip1001_config_init(struct phy_device *phydev)
 	value = phy_read(phydev, 16);
 	value |= 0x3;
 
-	err = phy_write(phydev, 16, value);
-	if (err < 0)
-		return err;
-
-	return err;
+	return phy_write(phydev, 16, value);
 }
 
 static int ip175c_read_status(struct phy_device *phydev)
-- 
1.7.2.5

Re: [PATCH] net: icplus: remove unnecessary code

From: David Miller <davem@davemloft.net>
Date: 2011-06-17 04:04:58

From: Greg Dietsche <redacted>
Date: Thu, 16 Jun 2011 12:04:30 -0500
Compile tested.
remove unnecessary code that matches this coccinelle pattern
	if (...)
		return ret;
	return ret;

Signed-off-by: Greg Dietsche <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help