Skip to content

Commit

Permalink
NET: phy_device, fix lock imbalance
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and David S. Miller committed Jul 14, 2009
1 parent ee686ca commit bc23283
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/phy/phy_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bc23283

Please sign in to comment.