summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-15 08:06:16 +0100
committerDavid S. Miller <davem@davemloft.net>2008-01-29 00:07:34 +0100
commitad12d0f418b7d3bbc6d1ccc4ff0858361cf0aafe (patch)
tree5491b7f28ff24c26e6c5939e72ebb3fc7dd44196
parentlibertas: kill cleanup_cmdnode() (diff)
downloadlinux-ad12d0f418b7d3bbc6d1ccc4ff0858361cf0aafe.tar.xz
linux-ad12d0f418b7d3bbc6d1ccc4ff0858361cf0aafe.zip
libertas: let __lbs_cmd() free its own cmdnode
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-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,
cmd->cmdwaitqwoken = 1;
wake_up_interruptible(&cmd->cmdwait_q);
- __lbs_cleanup_and_insert_cmd(priv, cmd);
+ if (!cmd->callback)
+ __lbs_cleanup_and_insert_cmd(priv, cmd);
priv->cur_cmd = NULL;
}
@@ -2219,6 +2220,7 @@ int __lbs_cmd(struct lbs_private *priv, uint16_t command,
priv->cur_cmd_retcode = 0;
ret = -1;
}
+ __lbs_cleanup_and_insert_cmd(priv, cmdnode);
spin_unlock_irqrestore(&priv->driver_lock, flags);
done: