From: Sergei Shtylyov Date: Sat, 12 Mar 2016 21:34:02 +0000 (+0300) Subject: of_mdio: use IS_ERR_OR_NULL() X-Git-Tag: v4.6-rc1~91^2~46^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ac044b902e50ba50713e257e331bc0e0c1c7d4d9;p=karo-tx-linux.git 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 Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller --- 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);