lbs_deb_enter(LBS_DEB_HOST);
- if (!cmdnode || !cmdnode->cmdbuf) {
- lbs_deb_host("QUEUE_CMD: cmdnode or cmdbuf is NULL\n");
+ if (!cmdnode) {
+ lbs_deb_host("QUEUE_CMD: cmdnode is NULL\n");
goto done;
}
if (!cmdnode->cmdbuf->size) {
spin_unlock_irqrestore(&priv->driver_lock, flags);
lbs_deb_host("QUEUE_CMD: inserted command 0x%04x into cmdpendingq\n",
- le16_to_cpu(cmdnode->cmdbuf->command));
+ le16_to_cpu(cmdnode->cmdbuf->command));
done:
lbs_deb_leave(LBS_DEB_HOST);
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 */
priv->seqnum++;
cmdptr->seqnum = cpu_to_le16(priv->seqnum);
cmdnode->callback = NULL;
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);
}