diff options
author | Ira W. Snyder <kernel@irasnyder.com> | 2006-11-22 02:59:09 +0000 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2006-12-01 16:12:37 -0800 |
commit | 0832d6b41e42dc682a53b2ab0417e6d285a1d523 (patch) | |
tree | 88d7b49ce57b69105a351fea6f049691a3d10042 /drivers | |
parent | e8203cf3c3824105a01b0e7476b01d389710631c (diff) |
[PATCH] 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>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/tg3.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index eafabb253f0..fa620aeb773 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -6889,8 +6889,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; |