]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Don't create PHY device when no valid PHY ID was found
authorLothar Waßmann <LW@KARO-electronics.de>
Mon, 18 Jun 2012 11:01:52 +0000 (13:01 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Mon, 18 Jun 2012 11:01:52 +0000 (13:01 +0200)
drivers/net/phy/phy.c

index 7d327f766a2cf23bbfd622de4f0b7e4bae8c4226..32e1500eaa253e71d702ccbdb66375c378be56d5 100644 (file)
@@ -612,10 +612,9 @@ struct phy_device *get_phy_device(struct mii_dev *bus, int addr,
 
                /* If the phy_id is mostly Fs, there is no device there */
                if ((phy_id & 0x1fffffff) != 0x1fffffff)
-                       break;
+                       return phy_device_create(bus, addr, phy_id, interface);
        }
-
-       return phy_device_create(bus, addr, phy_id, interface);
+       return NULL;
 }
 
 int phy_reset(struct phy_device *phydev)