Skip to content
Commit 1d463956 authored by YueHaibing's avatar YueHaibing Committed by David S. Miller
Browse files

mdio_bus: Fix PTR_ERR applied after initialization to constant



Fix coccinelle warning:

./drivers/net/phy/mdio_bus.c:67:5-12: ERROR: PTR_ERR applied after initialization to constant on line 62
./drivers/net/phy/mdio_bus.c:68:5-12: ERROR: PTR_ERR applied after initialization to constant on line 62

Fix this by using IS_ERR before PTR_ERR

Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Fixes: 71dd6c0d

 ("net: phy: add support for reset-controller")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a71a29f5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment