Messages in this thread Patch in this message | | | Date | Wed, 29 Nov 2006 14:00:28 -0800 | From | Chris Wright <> | Subject | [patch 17/23] TG3: Add missing unlock in tg3_open() error path. |
| |
-stable review patch. If anyone has any objections, please let us know. ------------------
From: Ira W. Snyder <kernel@irasnyder.com>
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> ---
drivers/net/tg3.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
--- linux-2.6.18.4.orig/drivers/net/tg3.c +++ linux-2.6.18.4/drivers/net/tg3.c @@ -6889,8 +6889,10 @@ static int tg3_open(struct net_device *d 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; -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |