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 <dmurphy@ti.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
b469139e81
commit
9267135cca
@ -123,12 +123,8 @@ static int dp83867_of_init(struct phy_device *phydev)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return 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);
|
&dp83867->fifo_depth);
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static int dp83867_of_init(struct phy_device *phydev)
|
static int dp83867_of_init(struct phy_device *phydev)
|
||||||
|
Reference in New Issue
Block a user