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: | 530 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Confirmation: | Fixed by bc23283c7bc90958927abe26eedc562701743a88 |
Tools: |
Stanse
(1.2)
|
Entered: | 2012-03-02 21:35:17 UTC |
500 * to the values in phydev. Assumes that the values are valid. 501 * Please see phy_sanitize_settings(). 502 */ 503int genphy_setup_forced(struct phy_device *phydev) 504{ 505 int err; 506 int ctl = 0; 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