* [PATCH] net/smc911x: Match up spin lock/unlock
@ 2007-02-01 15:30 Peter Korsgaard
0 siblings, 0 replies; only message in thread
From: Peter Korsgaard @ 2007-02-01 15:30 UTC (permalink / raw)
To: dustin, netdev; +Cc: linux-kernel
smc911x_phy_configure's error handling unconditionally unlocks the
spinlock even if it wasn't locked. Patch fixes it.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
drivers/net/smc911x.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: linux-trunk/drivers/net/smc911x.c
===================================================================
--- linux-trunk.orig/drivers/net/smc911x.c
+++ linux-trunk/drivers/net/smc911x.c
@@ -969,11 +969,11 @@
* We should not be called if phy_type is zero.
*/
if (lp->phy_type == 0)
- goto smc911x_phy_configure_exit;
+ goto smc911x_phy_configure_exit_nolock;
if (smc911x_phy_reset(dev, phyaddr)) {
printk("%s: PHY reset timed out\n", dev->name);
- goto smc911x_phy_configure_exit;
+ goto smc911x_phy_configure_exit_nolock;
}
spin_lock_irqsave(&lp->lock, flags);
@@ -1042,6 +1042,7 @@
smc911x_phy_configure_exit:
spin_unlock_irqrestore(&lp->lock, flags);
+smc911x_phy_configure_exit_nolock:
lp->work_pending = 0;
}
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-02-01 15:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-01 15:30 [PATCH] net/smc911x: Match up spin lock/unlock Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®