Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier...
[sfrench/cifs-2.6.git] / drivers / of / of_mdio.c
index 01d794abe105ce1bfcda114dedcf4ca0b7466610..42a6715f8e84287ed2eef40382dc7bc89e181fbf 100644 (file)
@@ -69,7 +69,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
                }
 
                phy = get_phy_device(mdio, be32_to_cpup(addr));
-               if (!phy) {
+               if (!phy || IS_ERR(phy)) {
                        dev_err(&mdio->dev, "error probing PHY at address %i\n",
                                *addr);
                        continue;
@@ -79,7 +79,6 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
                /* Associate the OF node with the device structure so it
                 * can be looked up later */
                of_node_get(child);
-               dev_archdata_set_node(&phy->dev.archdata, child);
                phy->dev.of_node = child;
 
                /* All data is now stored in the phy struct; register it */