]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
net: phy: Don't create phy device when there is no phy
authorBin Meng <bmeng.cn@gmail.com>
Thu, 8 Oct 2015 04:19:29 +0000 (21:19 -0700)
committerJoe Hershberger <joe.hershberger@ni.com>
Thu, 29 Oct 2015 19:05:48 +0000 (14:05 -0500)
In get_phy_device_by_mask(), when no phy is found, we should not
create any phy device.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/phy/phy.c

index a6023f1033ecc879eff43b7719b1ca66cb6f2157..4063894bf4673404a672ee7b5f3572d5ddec2b72 100644 (file)
@@ -672,7 +672,8 @@ static struct phy_device *get_phy_device_by_mask(struct mii_dev *bus,
                        return phydev;
        }
        printf("Phy %d not found\n", ffs(phy_mask) - 1);
-       return phy_device_create(bus, ffs(phy_mask) - 1, 0xffffffff, interface);
+
+       return NULL;
 }
 
 /**