Skip to content

Commit

Permalink
bna: unlock on error path in pnad_pci_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Aug 26, 2011
1 parent 3756a89 commit 44861f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/brocade/bna/bnad.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -3296,9 +3296,9 @@ bnad_pci_probe(struct pci_dev *pdev,
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;
}
Expand Down

0 comments on commit 44861f4

Please sign in to comment.