]> git.hungrycats.org Git - linux/commitdiff
net/smc911x: match up spin lock/unlock
authorPeter Korsgaard <jacmet@sunsite.dk>
Sat, 3 Feb 2007 09:13:50 +0000 (01:13 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 24 Feb 2007 00:24:25 +0000 (16:24 -0800)
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>
drivers/net/smc911x.c

index 797ab9125e72c0ca3799e4fc10f912f5f45b68ee..3d86b0d992b39e005cc6b7a79b20222ce702e23d 100644 (file)
@@ -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;
 }