Message ID | 1247520220-31960-1-git-send-email-jirislaby@gmail.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Jiri Slaby <jirislaby@gmail.com> Date: Mon, 13 Jul 2009 23:23:39 +0200 > Don't forget to unlock a mutex in phy_scan_fixups on a fail path. > > Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index eba937c..b10fedd 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);
Don't forget to unlock a mutex in phy_scan_fixups on a fail path. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> --- drivers/net/phy/phy_device.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)