diff options
Diffstat (limited to 'drivers/net/phy/phy_device.c')
-rw-r--r-- | drivers/net/phy/phy_device.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index ecd3da151e2d..3bbd5e70c209 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -212,11 +212,13 @@ struct phy_device *phy_attach(struct net_device *dev, | |||
212 | 212 | ||
213 | err = d->driver->probe(d); | 213 | err = d->driver->probe(d); |
214 | 214 | ||
215 | if (err < 0) | 215 | if (err >= 0) |
216 | return ERR_PTR(err); | 216 | err = device_bind_driver(d); |
217 | 217 | ||
218 | device_bind_driver(d); | ||
219 | up_write(&d->bus->subsys.rwsem); | 218 | up_write(&d->bus->subsys.rwsem); |
219 | |||
220 | if (err) | ||
221 | return ERR_PTR(err); | ||
220 | } | 222 | } |
221 | 223 | ||
222 | if (phydev->attached_dev) { | 224 | if (phydev->attached_dev) { |