Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 243557
b: refs/heads/master
c: d005a09
h: refs/heads/master
i:
  243555: 3a9f555
v: v3
  • Loading branch information
Marc Kleine-Budde authored and David S. Miller committed Mar 30, 2011
1 parent 0879ca3 commit f050c90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff9a57a62afbbe2d0f3a09af321f1fd7645f38a5
refs/heads/master: d005a09edf8b12dd1bec651b2cf94caa0e7bb1be
8 changes: 6 additions & 2 deletions trunk/drivers/net/phy/phy_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,11 +442,11 @@ static int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
u32 flags, phy_interface_t interface)
{
struct device *d = &phydev->dev;
int err;

/* Assume that if there is no driver, that it doesn't
* exist, and we should use the genphy driver. */
if (NULL == d->driver) {
int err;
d->driver = &genphy_driver.driver;

err = d->driver->probe(d);
Expand Down Expand Up @@ -474,7 +474,11 @@ static int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
/* Do initial configuration here, now that
* we have certain key parameters
* (dev_flags and interface) */
return phy_init_hw(phydev);
err = phy_init_hw(phydev);
if (err)
phy_detach(phydev);

return err;
}

/**
Expand Down

0 comments on commit f050c90

Please sign in to comment.