From: Wei Yongjun Date: Mon, 15 Aug 2016 22:34:57 +0000 (+0000) Subject: net: phy: Fix return value check in xgmiitorgmii_probe() X-Git-Tag: v4.14-rc1~2261^2~96 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64721094b9a966c8e02d2b03729e5093471f9d1c;p=platform%2Fkernel%2Flinux-rpi.git net: phy: Fix return value check in xgmiitorgmii_probe() In case of error, the function of_parse_phandle() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c index 8e980ad..cad6e19 100644 --- a/drivers/net/phy/xilinx_gmii2rgmii.c +++ b/drivers/net/phy/xilinx_gmii2rgmii.c @@ -67,7 +67,7 @@ int xgmiitorgmii_probe(struct mdio_device *mdiodev) return -ENOMEM; phy_node = of_parse_phandle(np, "phy-handle", 0); - if (IS_ERR(phy_node)) { + if (!phy_node) { dev_err(dev, "Couldn't parse phy-handle\n"); return -ENODEV; }