[TG3]: Add missing unlock in tg3_open() error path.

Sparse noticed a locking imbalance in tg3_open(). This patch adds an
unlock to one of the error paths, so that tg3_open() always exits
without the lock held.

Signed-off-by: Ira W. Snyder <kernel@irasnyder.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Ira W. Snyder 2006-11-21 17:44:31 -08:00 committed by David S. Miller
parent f2776ff047
commit 12862086f2
1 changed files with 3 additions and 1 deletions

View File

@ -6979,8 +6979,10 @@ static int tg3_open(struct net_device *dev)
tg3_full_lock(tp, 0);
err = tg3_set_power_state(tp, PCI_D0);
if (err)
if (err) {
tg3_full_unlock(tp);
return err;
}
tg3_disable_ints(tp);
tp->tg3_flags &= ~TG3_FLAG_INIT_COMPLETE;