Commit c4ab4127 authored by David Woodhouse's avatar David Woodhouse Committed by David S. Miller

libertas: remove some pointless checks for cmdnode buffer being present

We allocate them all at the same time, at startup. If they go missing,
we have more serious things to worry about, and the resulting oops will
be a perfectly acceptable result.
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b23b2061
...@@ -1166,8 +1166,8 @@ void lbs_queue_cmd(struct lbs_private *priv, ...@@ -1166,8 +1166,8 @@ void lbs_queue_cmd(struct lbs_private *priv,
lbs_deb_enter(LBS_DEB_HOST); lbs_deb_enter(LBS_DEB_HOST);
if (!cmdnode || !cmdnode->cmdbuf) { if (!cmdnode) {
lbs_deb_host("QUEUE_CMD: cmdnode or cmdbuf is NULL\n"); lbs_deb_host("QUEUE_CMD: cmdnode is NULL\n");
goto done; goto done;
} }
if (!cmdnode->cmdbuf->size) { if (!cmdnode->cmdbuf->size) {
...@@ -1380,13 +1380,6 @@ int lbs_prepare_and_send_command(struct lbs_private *priv, ...@@ -1380,13 +1380,6 @@ int lbs_prepare_and_send_command(struct lbs_private *priv,
lbs_deb_host("PREP_CMD: command 0x%04x\n", cmd_no); lbs_deb_host("PREP_CMD: command 0x%04x\n", cmd_no);
if (!cmdptr) {
lbs_deb_host("PREP_CMD: cmdptr is NULL\n");
lbs_cleanup_and_insert_cmd(priv, cmdnode);
ret = -1;
goto done;
}
/* Set sequence number, command and INT option */ /* Set sequence number, command and INT option */
priv->seqnum++; priv->seqnum++;
cmdptr->seqnum = cpu_to_le16(priv->seqnum); cmdptr->seqnum = cpu_to_le16(priv->seqnum);
...@@ -1786,7 +1779,6 @@ static void cleanup_cmdnode(struct cmd_ctrl_node *cmdnode) ...@@ -1786,7 +1779,6 @@ static void cleanup_cmdnode(struct cmd_ctrl_node *cmdnode)
cmdnode->callback = NULL; cmdnode->callback = NULL;
cmdnode->callback_arg = 0; cmdnode->callback_arg = 0;
if (cmdnode->cmdbuf != NULL)
memset(cmdnode->cmdbuf, 0, LBS_CMD_BUFFER_SIZE); memset(cmdnode->cmdbuf, 0, LBS_CMD_BUFFER_SIZE);
lbs_deb_leave(LBS_DEB_HOST); lbs_deb_leave(LBS_DEB_HOST);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment