* [PATCH -next] net: phy: Fix return value check in xgmiitorgmii_probe()
@ 2016-08-15 22:34 Wei Yongjun
2016-08-15 23:34 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-08-15 22:34 UTC (permalink / raw)
To: f.fainelli, michal.simek, soren.brinkmann, appana.durga.rao
Cc: Wei Yongjun, netdev, linux-arm-kernel
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>
---
drivers/net/phy/xilinx_gmii2rgmii.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] net: phy: Fix return value check in xgmiitorgmii_probe()
2016-08-15 22:34 [PATCH -next] net: phy: Fix return value check in xgmiitorgmii_probe() Wei Yongjun
@ 2016-08-15 23:34 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-08-15 23:34 UTC (permalink / raw)
To: weiyj.lk
Cc: f.fainelli, michal.simek, soren.brinkmann, appana.durga.rao,
netdev, linux-arm-kernel
From: Wei Yongjun <weiyj.lk@gmail.com>
Date: Mon, 15 Aug 2016 22:34:57 +0000
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-15 23:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-15 22:34 [PATCH -next] net: phy: Fix return value check in xgmiitorgmii_probe() Wei Yongjun
2016-08-15 23:34 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).