Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] 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>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Peter Korsgaard and committed by
Linus Torvalds
24d8f6ad 29a00277

+3 -2
+3 -2
drivers/net/smc911x.c
··· 968 968 * We should not be called if phy_type is zero. 969 969 */ 970 970 if (lp->phy_type == 0) 971 - goto smc911x_phy_configure_exit; 971 + goto smc911x_phy_configure_exit_nolock; 972 972 973 973 if (smc911x_phy_reset(dev, phyaddr)) { 974 974 printk("%s: PHY reset timed out\n", dev->name); 975 - goto smc911x_phy_configure_exit; 975 + goto smc911x_phy_configure_exit_nolock; 976 976 } 977 977 spin_lock_irqsave(&lp->lock, flags); 978 978 ··· 1041 1041 1042 1042 smc911x_phy_configure_exit: 1043 1043 spin_unlock_irqrestore(&lp->lock, flags); 1044 + smc911x_phy_configure_exit_nolock: 1044 1045 lp->work_pending = 0; 1045 1046 } 1046 1047