All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] NET: phy_device, fix lock imbalance
@ 2009-07-13 21:23 Jiri Slaby
  2009-07-13 21:23 ` [PATCH 2/2] NET: sungem, use spin_trylock_irqsave Jiri Slaby
  2009-07-14 19:27 ` [PATCH 1/2] NET: phy_device, fix lock imbalance David Miller
  0 siblings, 2 replies; 6+ messages in thread
From: Jiri Slaby @ 2009-07-13 21:23 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-kernel, Jiri Slaby

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(-)

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);
-- 
1.6.3.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-07-14 21:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-13 21:23 [PATCH 1/2] NET: phy_device, fix lock imbalance Jiri Slaby
2009-07-13 21:23 ` [PATCH 2/2] NET: sungem, use spin_trylock_irqsave Jiri Slaby
2009-07-14  2:12   ` David Miller
2009-07-14 21:10   ` David Miller
2009-07-14 21:18     ` Jiri Slaby
2009-07-14 19:27 ` [PATCH 1/2] NET: phy_device, fix lock imbalance David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.