of_mdio: get_phy_device() doesn't return NULL anymore
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Sun, 24 Apr 2016 17:31:42 +0000 (20:31 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Apr 2016 19:41:20 +0000 (15:41 -0400)
Now that get_phy_device() no longer returns NULL on error, we don't need
to check for it...

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 2c1e52e06102faeaeb39cae46c855a418b84e5b9..b622b33dbf93e1dc8742574ed614a3d107de9022 100644 (file)
@@ -56,7 +56,7 @@ static void of_mdiobus_register_phy(struct mii_bus *mdio,
                phy = phy_device_create(mdio, addr, phy_id, 0, NULL);
        else
                phy = get_phy_device(mdio, addr, is_c45);
-       if (IS_ERR_OR_NULL(phy))
+       if (IS_ERR(phy))
                return;
 
        rc = irq_of_parse_and_map(child, 0);