diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2009-07-13 13:23:39 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-14 21:03:39 +0200 |
commit | bc23283c7bc90958927abe26eedc562701743a88 (patch) | |
tree | 9bf032d073db84d3b094d2c43fd0cb352095ce45 /drivers/net/phy/phy_device.c | |
parent | gre: fix ToS/DiffServ inherit bug (diff) | |
download | linux-bc23283c7bc90958927abe26eedc562701743a88.tar.xz linux-bc23283c7bc90958927abe26eedc562701743a88.zip |
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>
Diffstat (limited to 'drivers/net/phy/phy_device.c')
-rw-r--r-- | drivers/net/phy/phy_device.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index eba937c46376..b10fedd82143 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -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); |