]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ipw2100: Fix deadlock detected by lockdep
authorZhu Yi <yi.zhu@intel.com>
Mon, 21 Aug 2006 03:38:52 +0000 (11:38 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 29 Aug 2006 21:06:33 +0000 (17:06 -0400)
Fix by removing dependency between priv->action_sem and rtnl semaphore.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ipw2100.c

index e955db435b30b4ef9e2c87106790ada253582fa6..5d5dab6a209c297a94e2be1fad17a3399acba46f 100644 (file)
@@ -6254,13 +6254,14 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
         * member to call a function that then just turns and calls ipw2100_up.
         * net_dev->init is called after name allocation but before the
         * notifier chain is called */
-       mutex_lock(&priv->action_mutex);
        err = register_netdev(dev);
        if (err) {
                printk(KERN_WARNING DRV_NAME
                       "Error calling register_netdev.\n");
-               goto fail_unlock;
+               goto fail;
        }
+
+       mutex_lock(&priv->action_mutex);
        registered = 1;
 
        IPW_DEBUG_INFO("%s: Bound to %s\n", dev->name, pci_name(pci_dev));