Fixes the release of a spinlock that can occur without
the spinlock having been taken.

Signed-off-by: Jason Borg <[EMAIL PROTECTED]>
---

diff -uprN linux-2.6.18-rc4-orig/drivers/net/smc911x.c 
linux-2.6.18-rc4/drivers/net/smc911x.c
--- linux-2.6.18-rc4-orig/drivers/net/smc911x.c 2006-08-22 15:41:04.914560562 
-0400
+++ linux-2.6.18-rc4/drivers/net/smc911x.c      2006-08-22 15:47:14.057064822 
-0400
@@ -967,11 +967,11 @@ static void smc911x_phy_configure(void *
         * 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_pre_lock;
 
        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_pre_lock;
        }
        spin_lock_irqsave(&lp->lock, flags);
 
@@ -1040,6 +1040,7 @@ static void smc911x_phy_configure(void *
 
 smc911x_phy_configure_exit:
        spin_unlock_irqrestore(&lp->lock, flags);
+smc911x_phy_configure_exit_pre_lock:
        lp->work_pending = 0;
 }
 


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to