Re: [PATCH net-next] mdio_bus: Fix PTR_ERR() usage after initialization to constant

2019-02-15 Thread YueHaibing
On 2019/2/1 12:24, Al Viro wrote: > On Tue, Jan 29, 2019 at 11:30:27AM +0800, YueHaibing wrote: gpiod = fwnode_get_named_gpiod(&mdiodev->dev.of_node->fwnode, "reset-gpios", 0, GPIOD_OUT_LOW,

Re: [PATCH net-next] mdio_bus: Fix PTR_ERR() usage after initialization to constant

2019-01-31 Thread Al Viro
On Tue, Jan 29, 2019 at 11:30:27AM +0800, YueHaibing wrote: > >>gpiod = fwnode_get_named_gpiod(&mdiodev->dev.of_node->fwnode, > >> "reset-gpios", 0, GPIOD_OUT_LOW, > >> "PHY reset"); > >> - if (PTR_ERR(

Re: [PATCH net-next] mdio_bus: Fix PTR_ERR() usage after initialization to constant

2019-01-28 Thread YueHaibing
On 2019/1/28 22:36, Andrew Lunn wrote: > On Mon, Jan 28, 2019 at 09:24:09PM +0800, YueHaibing wrote: >> Fix coccinelle warning: >> >> ./drivers/net/phy/mdio_bus.c:51:5-12: ERROR: PTR_ERR applied after >> initialization to constant on line 44 >> ./drivers/net/phy/mdio_bus.c:52:5-12: ERROR: PTR_ER

Re: [PATCH net-next] mdio_bus: Fix PTR_ERR() usage after initialization to constant

2019-01-28 Thread Andrew Lunn
On Mon, Jan 28, 2019 at 09:24:09PM +0800, YueHaibing wrote: > Fix coccinelle warning: > > ./drivers/net/phy/mdio_bus.c:51:5-12: ERROR: PTR_ERR applied after > initialization to constant on line 44 > ./drivers/net/phy/mdio_bus.c:52:5-12: ERROR: PTR_ERR applied after > initialization to constant o

[PATCH net-next] mdio_bus: Fix PTR_ERR() usage after initialization to constant

2019-01-28 Thread YueHaibing
Fix coccinelle warning: ./drivers/net/phy/mdio_bus.c:51:5-12: ERROR: PTR_ERR applied after initialization to constant on line 44 ./drivers/net/phy/mdio_bus.c:52:5-12: ERROR: PTR_ERR applied after initialization to constant on line 44 fix this by using IS_ERR before PTR_ERR Fixes: bafbdd527d56