diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-01 11:53:50 -0400 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-01 11:53:50 -0400 | 
| commit | 84daeb09ef2b11cb0b29e100766e38e206c8bc47 (patch) | |
| tree | c89748e1bb8618aac7ad0d2079fba43543844483 /drivers/net/phy/phy_device.c | |
| parent | ecb78ab6f30106ab72a575a25b1cdfd1633b7ca2 (diff) | |
| parent | c100c8f4c3c6f2a407bdbaaad2c4f1062e6a473a (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  appletalk: Fix OOPS in atalk_release().
  mlx4: Fixing bad size of event queue buffer
  mlx4: Fixing use after free
  bonding:typo in comment
  sctp: Pass __GFP_NOWARN to hash table allocation attempts.
  connector: convert to synchronous netlink message processing
  fib: add rtnl locking in ip_fib_net_exit
  atm/solos-pci: Don't flap VCs when carrier state changes
  atm/solos-pci: Don't include frame pseudo-header on transmit hex-dump
  atm/solos-pci: Use VPI.VCI notation uniformly.
  Atheros, atl2: Fix mem leaks in error paths of atl2_set_eeprom
  netdev: fix mtu check when TSO is enabled
  net/usb: Ethernet quirks for the LG-VL600 4G modem
  phylib: phy_attach_direct: phy_init_hw can fail, add cleanup
  bridge: mcast snooping, fix length check of snooped MLDv1/2
  via-ircc: Pass PCI device pointer to dma_{alloc, free}_coherent()
  via-ircc: Use pci_{get, set}_drvdata() instead of static pointer variable
  net: gre: provide multicast mappings for ipv4 and ipv6
  bridge: Fix compilation warning in function br_stp_recalculate_bridge_id()
  net: Fix warnings caused by MAX_SKB_FRAGS change.
Diffstat (limited to 'drivers/net/phy/phy_device.c')
| -rw-r--r-- | drivers/net/phy/phy_device.c | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 993c52c82aeb..e870c0698bbe 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c  | |||
| @@ -442,11 +442,11 @@ static int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, | |||
| 442 | u32 flags, phy_interface_t interface) | 442 | u32 flags, phy_interface_t interface) | 
| 443 | { | 443 | { | 
| 444 | struct device *d = &phydev->dev; | 444 | struct device *d = &phydev->dev; | 
| 445 | int err; | ||
| 445 | 446 | ||
| 446 | /* Assume that if there is no driver, that it doesn't | 447 | /* Assume that if there is no driver, that it doesn't | 
| 447 | * exist, and we should use the genphy driver. */ | 448 | * exist, and we should use the genphy driver. */ | 
| 448 | if (NULL == d->driver) { | 449 | if (NULL == d->driver) { | 
| 449 | int err; | ||
| 450 | d->driver = &genphy_driver.driver; | 450 | d->driver = &genphy_driver.driver; | 
| 451 | 451 | ||
| 452 | err = d->driver->probe(d); | 452 | err = d->driver->probe(d); | 
| @@ -474,7 +474,11 @@ static int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, | |||
| 474 | /* Do initial configuration here, now that | 474 | /* Do initial configuration here, now that | 
| 475 | * we have certain key parameters | 475 | * we have certain key parameters | 
| 476 | * (dev_flags and interface) */ | 476 | * (dev_flags and interface) */ | 
| 477 | return phy_init_hw(phydev); | 477 | err = phy_init_hw(phydev); | 
| 478 | if (err) | ||
| 479 | phy_detach(phydev); | ||
| 480 | |||
| 481 | return err; | ||
| 478 | } | 482 | } | 
| 479 | 483 | ||
| 480 | /** | 484 | /** | 
