diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2016-08-16 00:34:57 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-16 01:16:10 +0200 |
commit | 64721094b9a966c8e02d2b03729e5093471f9d1c (patch) | |
tree | e99ef0a89e69d6d2caeadf61aa8a409a25a689d0 /drivers/net/phy/xilinx_gmii2rgmii.c | |
parent | net: hns: mdio->irq is an array, so no need to check if it is null (diff) | |
download | linux-64721094b9a966c8e02d2b03729e5093471f9d1c.tar.xz linux-64721094b9a966c8e02d2b03729e5093471f9d1c.zip |
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 <weiyj.lk@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/xilinx_gmii2rgmii.c')
-rw-r--r-- | drivers/net/phy/xilinx_gmii2rgmii.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c index 8e980ad476a4..cad6e19724e2 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; } |