Commit 12862086 authored by Ira W. Snyder's avatar Ira W. Snyder Committed by David S. Miller

[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: default avatarIra W. Snyder <kernel@irasnyder.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f2776ff0
...@@ -6979,8 +6979,10 @@ static int tg3_open(struct net_device *dev) ...@@ -6979,8 +6979,10 @@ static int tg3_open(struct net_device *dev)
tg3_full_lock(tp, 0); tg3_full_lock(tp, 0);
err = tg3_set_power_state(tp, PCI_D0); err = tg3_set_power_state(tp, PCI_D0);
if (err) if (err) {
tg3_full_unlock(tp);
return err; return err;
}
tg3_disable_ints(tp); tg3_disable_ints(tp);
tp->tg3_flags &= ~TG3_FLAG_INIT_COMPLETE; tp->tg3_flags &= ~TG3_FLAG_INIT_COMPLETE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment