netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch -next] bna: unlock on error path in pnad_pci_probe()
@ 2011-08-24 11:29 Dan Carpenter
  2011-08-24 17:25 ` Rasesh Mody
  2011-08-26 16:51 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2011-08-24 11:29 UTC (permalink / raw)
  To: Rasesh Mody
  Cc: Debashis Dutt, open list:BROCADE BNA 10 GI..., kernel-janitors

We introduced a new lock here, so there was error path which needs
an unlock now.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
index bdfda07..6ad4b47 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.c
+++ b/drivers/net/ethernet/brocade/bna/bnad.c
@@ -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;
 }

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-26 16:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-24 11:29 [patch -next] bna: unlock on error path in pnad_pci_probe() Dan Carpenter
2011-08-24 17:25 ` Rasesh Mody
2011-08-26 16:51 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).