of_mdio: use IS_ERR_OR_NULL()
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Sat, 12 Mar 2016 21:34:02 +0000 (00:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Mar 2016 19:31:58 +0000 (15:31 -0400)
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>
drivers/of/of_mdio.c

index 3bc68acac64cf91137a0809764307b2ec9e015f1..52d9b14e17175b5f38709f441e036191400b772f 100644 (file)
@@ -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);