提交 12862086 编写于 作者: I Ira W. Snyder 提交者: 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: NIra W. Snyder <kernel@irasnyder.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f2776ff0
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册