From: Dan Carpenter Date: Wed, 24 Aug 2011 01:29:22 +0000 (+0000) Subject: bna: unlock on error path in pnad_pci_probe() X-Git-Tag: firefly_0821_release~3680^2~4273^2~381 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=44861f4455a77beaec2e53459c77b7fb0eda91a7;p=firefly-linux-kernel-4.4.55.git bna: unlock on error path in pnad_pci_probe() We introduced a new lock here, so there was error path which needs an unlock now. Signed-off-by: Dan Carpenter Acked-by: Rasesh Mody Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c index bdfda0779a84..6ad4b477a4ef 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; }