aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas/cmd.c')
-rw-r--r--drivers/net/wireless/libertas/cmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 4c0bd9f5c196..e7f07c3098f4 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -1310,7 +1310,8 @@ void lbs_complete_command(struct lbs_private *priv, struct cmd_ctrl_node *cmd,
1310 cmd->cmdwaitqwoken = 1; 1310 cmd->cmdwaitqwoken = 1;
1311 wake_up_interruptible(&cmd->cmdwait_q); 1311 wake_up_interruptible(&cmd->cmdwait_q);
1312 1312
1313 __lbs_cleanup_and_insert_cmd(priv, cmd); 1313 if (!cmd->callback)
1314 __lbs_cleanup_and_insert_cmd(priv, cmd);
1314 priv->cur_cmd = NULL; 1315 priv->cur_cmd = NULL;
1315} 1316}
1316 1317
@@ -2219,6 +2220,7 @@ int __lbs_cmd(struct lbs_private *priv, uint16_t command,
2219 priv->cur_cmd_retcode = 0; 2220 priv->cur_cmd_retcode = 0;
2220 ret = -1; 2221 ret = -1;
2221 } 2222 }
2223 __lbs_cleanup_and_insert_cmd(priv, cmdnode);
2222 spin_unlock_irqrestore(&priv->driver_lock, flags); 2224 spin_unlock_irqrestore(&priv->driver_lock, flags);
2223 2225
2224done: 2226done: