summaryrefslogtreecommitdiffstats
path: root/drivers/of/of_mdio.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2016-03-12 22:34:02 +0100
committerDavid S. Miller <davem@davemloft.net>2016-03-14 20:31:58 +0100
commitac044b902e50ba50713e257e331bc0e0c1c7d4d9 (patch)
treebd8db80923656335467c272cff24afb641c93225 /drivers/of/of_mdio.c
parentof_mdio: mdio_device_create() never returns NULL (diff)
downloadlinux-ac044b902e50ba50713e257e331bc0e0c1c7d4d9.tar.xz
linux-ac044b902e50ba50713e257e331bc0e0c1c7d4d9.zip
of_mdio: use IS_ERR_OR_NULL()
IS_ERR_OR_NULL() is open coded in of_mdiobus_register_phy(), so just call it directly... Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/of/of_mdio.c')
-rw-r--r--drivers/of/of_mdio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 3bc68acac64c..52d9b14e1717 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -56,7 +56,7 @@ static int of_mdiobus_register_phy(struct mii_bus *mdio, struct device_node *chi
phy = phy_device_create(mdio, addr, phy_id, 0, NULL);
else
phy = get_phy_device(mdio, addr, is_c45);
- if (!phy || IS_ERR(phy))
+ if (IS_ERR_OR_NULL(phy))
return 1;
rc = irq_of_parse_and_map(child, 0);