User: | Jiri Slaby |
Error type: | Leaving function in locked state |
Error type description: | Some lock is not unlocked on all paths of a function, so it is leaked |
File location: | drivers/net/phy/phy_device.c |
Line in file: | 537 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
|
Entered: | 2012-05-29 20:11:37 UTC |
507 508 phydev->pause = phydev->asym_pause = 0; 509 510 if (SPEED_1000 == phydev->speed) 511 ctl |= BMCR_SPEED1000; 512 else if (SPEED_100 == phydev->speed) 513 ctl |= BMCR_SPEED100; 514 515 if (DUPLEX_FULL == phydev->duplex) 516 ctl |= BMCR_FULLDPLX; 517 518 err = phy_write(phydev, MII_BMCR, ctl); 519 520 if (err < 0) 521 return err; 522 523 /* 524 * Run the fixups on this PHY, just in case the 525 * board code needs to change something after a reset 526 */ 527 err = phy_scan_fixups(phydev); 528 529 if (err < 0) 530 return err; 531 532 /* We just reset the device, so we'd better configure any 533 * settings the PHY requires to operate */ 534 if (phydev->drv->config_init) 535 err = phydev->drv->config_init(phydev); 536 537 return err; 538} 539 540 541/** 542 * genphy_restart_aneg - Enable and Restart Autonegotiation 543 * @phydev: target phy_device struct 544 */ 545int genphy_restart_aneg(struct phy_device *phydev) 546{ 547 int ctl;