Skip to content

Commit 9267135

Browse files
Wu Fengguangdavem330
authored andcommitted
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>
1 parent b469139 commit 9267135

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/net/phy/dp83867.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,8 @@ static int dp83867_of_init(struct phy_device *phydev)
123123
if (ret)
124124
return ret;
125125

126-
ret = of_property_read_u32(of_node, "ti,fifo-depth",
126+
return of_property_read_u32(of_node, "ti,fifo-depth",
127127
&dp83867->fifo_depth);
128-
if (ret)
129-
return ret;
130-
131-
return 0;
132128
}
133129
#else
134130
static int dp83867_of_init(struct phy_device *phydev)

0 commit comments

Comments
 (0)