Skip to content

Commit

Permalink
libertas: don't spin_unlock_irq() twice
Browse files Browse the repository at this point in the history
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 <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Holger Schurig authored and John W. Linville committed Jun 3, 2008
1 parent 23c0752 commit b43441a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/wireless/libertas/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down

0 comments on commit b43441a

Please sign in to comment.