diff options
author | Ira W. Snyder <kernel@irasnyder.com> | 2006-11-21 20:44:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-11-21 20:44:31 -0500 |
commit | 12862086f24d7382b24379bbcbe0dadf12ca5945 (patch) | |
tree | e1fc65a347e23171d28054eeb97316dd255bb97a /drivers/net/tg3.c | |
parent | f2776ff047229c3e7cee2454e2704dd6f98fa32f (diff) |
[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>
Diffstat (limited to 'drivers/net/tg3.c')
-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 1dbdd6bb587b..c20bb998e0e5 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -6979,8 +6979,10 @@ static int tg3_open(struct net_device *dev) | |||
6979 | tg3_full_lock(tp, 0); | 6979 | tg3_full_lock(tp, 0); |
6980 | 6980 | ||
6981 | err = tg3_set_power_state(tp, PCI_D0); | 6981 | err = tg3_set_power_state(tp, PCI_D0); |
6982 | if (err) | 6982 | if (err) { |
6983 | tg3_full_unlock(tp); | ||
6983 | return err; | 6984 | return err; |
6985 | } | ||
6984 | 6986 | ||
6985 | tg3_disable_ints(tp); | 6987 | tg3_disable_ints(tp); |
6986 | tp->tg3_flags &= ~TG3_FLAG_INIT_COMPLETE; | 6988 | tp->tg3_flags &= ~TG3_FLAG_INIT_COMPLETE; |