NET: phy_device, fix lock imbalance

Don't forget to unlock a mutex in phy_scan_fixups on a fail path.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Slaby 2009-07-13 11:23:39 +00:00 committed by David S. Miller
parent ee686ca919
commit bc23283c7b

View File

@ -134,8 +134,10 @@ int phy_scan_fixups(struct phy_device *phydev)
err = fixup->run(phydev);
if (err < 0)
if (err < 0) {
mutex_unlock(&phy_fixup_lock);
return err;
}
}
}
mutex_unlock(&phy_fixup_lock);