diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2015-10-07 21:19:29 -0700 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2015-10-29 14:05:48 -0500 |
commit | 0132b9ab6e6593d1fd259cdd26261f184c436fdd (patch) | |
tree | f251cdc1cb532abbacaffa51a2052effea002bf5 /drivers/net/phy | |
parent | 4f485150cfdc1cbbf841e46236dd5052fbe5c542 (diff) |
net: phy: Don't create phy device when there is no phy
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>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/phy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index a6023f1033..4063894bf4 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -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; } /** |