From: Holger Schurig Date: Fri, 23 May 2008 08:07:56 +0000 (+0200) Subject: libertas: don't spin_unlock_irq() twice X-Git-Tag: v2.6.27-rc1~969^2~337^2~63 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b43441a49d1c64769ff90f34e9543b2ba840b517;p=linux-2.6-omap-h63xx.git libertas: don't spin_unlock_irq() twice priv->driver_lock has already been unlocked some lines above. This patch fixes the sparse warning: drivers/net/wireless/libertas/main.c:792:6: warning: context problem in 'lbs_thread': '_spin_unlock_irq' expected different context drivers/net/wireless/libertas/main.c:792:6: context 'lock': wanted >= 1, got 0 Signed-of-by: Holger Schurig Acked-by: Dan Williams Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index baafa44cfb3..0cd4702d2f7 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c @@ -788,11 +788,8 @@ static int lbs_thread(void *data) le16_to_cpu(cmdnode->cmdbuf->command)); lbs_complete_command(priv, cmdnode, -ETIMEDOUT); priv->nr_retries = 0; - if (priv->reset_card) { - spin_unlock_irq(&priv->driver_lock); + if (priv->reset_card) priv->reset_card(priv); - spin_lock_irq(&priv->driver_lock); - } } else { priv->cur_cmd = NULL; lbs_pr_info("requeueing command 0x%04x due "