bna: unlock on error path in pnad_pci_probe()
authorDan Carpenter <error27@gmail.com>
Wed, 24 Aug 2011 01:29:22 +0000 (01:29 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Aug 2011 16:55:18 +0000 (12:55 -0400)
We introduced a new lock here, so there was error path which needs
an unlock now.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/brocade/bna/bnad.c

index bdfda07..6ad4b47 100644 (file)
@@ -3167,7 +3167,7 @@ bnad_pci_probe(struct pci_dev *pdev,
         */
        err = bnad_pci_init(bnad, pdev, &using_dac);
        if (err)
-               goto free_netdev;
+               goto unlock_mutex;
 
        /*
         * Initialize bnad structure
@@ -3296,9 +3296,9 @@ drv_uninit:
        bnad_uninit(bnad);
 pci_uninit:
        bnad_pci_uninit(pdev);
+unlock_mutex:
        mutex_unlock(&bnad->conf_mutex);
        bnad_lock_uninit(bnad);
-free_netdev:
        free_netdev(netdev);
        return err;
 }