bna: PCI Probe Conf Lock Fix
authorRasesh Mody <rmody@brocade.com>
Thu, 22 Sep 2011 00:55:41 +0000 (20:55 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Sep 2011 00:55:41 +0000 (20:55 -0400)
commit3fc72370186be2f9d4d6ef06d99e1caa5d92c564
tree94537707a3ed7c7f1ab1584cd11923ff20b49a1b
parentb7a17c0d846aab9f0e5d1dd3d005152c4ce459aa
bna: PCI Probe Conf Lock Fix

If register_netdev() fails now, then we call mutex_unlock(&bnad->conf_mutex);
on the error path, but it's already unlocked. So we acquire the lock in error
path which will be later unlocked after the cleanup.

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