diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2007-02-03 01:13:50 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-23 16:24:25 -0800 |
commit | 38141b5aa58969bd3dcd8259711b99fd64c8963b (patch) | |
tree | f4b85320ea0ecff4476e80e1f5a4e2172cfb65d7 | |
parent | 982a9e019fcf803319b13366b984a4e52cd66712 (diff) |
net/smc911x: match up spin lock/unlock
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>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/net/smc911x.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 797ab9125e72..3d86b0d992b3 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -965,11 +965,11 @@ static void smc911x_phy_configure(void *data) * 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); @@ -1038,6 +1038,7 @@ static void smc911x_phy_configure(void *data) smc911x_phy_configure_exit: spin_unlock_irqrestore(&lp->lock, flags); +smc911x_phy_configure_exit_nolock: lp->work_pending = 0; } |