From: Wu Fengguang Date: Fri, 24 Jul 2015 06:16:10 +0000 (+0800) Subject: net: phy: dp83867: fix simple_return.cocci warnings X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=9267135cca60674321139626f49077a4937d730e;p=openwrt%2Fstaging%2Fblogic.git net: phy: dp83867: fix simple_return.cocci warnings drivers/net/phy/dp83867.c:126:1-4: WARNING: end returns can be simpified drivers/net/phy/dp83867.c:74:5-8: WARNING: end returns can be simpified if tested value is negative or 0 Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci CC: Dan Murphy Signed-off-by: Fengguang Wu Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index 8a3bf5469892..32f10662f4ac 100644 --- a/drivers/net/phy/dp83867.c +++ b/drivers/net/phy/dp83867.c @@ -123,12 +123,8 @@ static int dp83867_of_init(struct phy_device *phydev) if (ret) return ret; - ret = of_property_read_u32(of_node, "ti,fifo-depth", + return of_property_read_u32(of_node, "ti,fifo-depth", &dp83867->fifo_depth); - if (ret) - return ret; - - return 0; } #else static int dp83867_of_init(struct phy_device *phydev)