Skip to content

Commit 44861f4

Browse files
error27davem330
authored andcommitted
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 <error27@gmail.com> Acked-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 3756a89 commit 44861f4

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/ethernet/brocade/bna

1 file changed

+2
-2
lines changed

drivers/net/ethernet/brocade/bna/bnad.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3167,7 +3167,7 @@ bnad_pci_probe(struct pci_dev *pdev,
31673167
*/
31683168
err = bnad_pci_init(bnad, pdev, &using_dac);
31693169
if (err)
3170-
goto free_netdev;
3170+
goto unlock_mutex;
31713171

31723172
/*
31733173
* Initialize bnad structure
@@ -3296,9 +3296,9 @@ bnad_pci_probe(struct pci_dev *pdev,
32963296
bnad_uninit(bnad);
32973297
pci_uninit:
32983298
bnad_pci_uninit(pdev);
3299+
unlock_mutex:
32993300
mutex_unlock(&bnad->conf_mutex);
33003301
bnad_lock_uninit(bnad);
3301-
free_netdev:
33023302
free_netdev(netdev);
33033303
return err;
33043304
}

0 commit comments

Comments
 (0)