diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-15 00:41:51 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 15:07:31 -0800 |
commit | c4ab41272b55a08741d2e68966aae700e2e6d597 (patch) | |
tree | b96e705dfe139465a839ccb7145650c5e10e589c /drivers/net/wireless/libertas/cmd.c | |
parent | b23b2061e5758d4827630ee900b4b290376d0059 (diff) | |
download | talos-op-linux-c4ab41272b55a08741d2e68966aae700e2e6d597.tar.gz talos-op-linux-c4ab41272b55a08741d2e68966aae700e2e6d597.zip |
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: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmd.c')
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 4dc6bbe5f110..4ffb84a403b3 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c @@ -1166,8 +1166,8 @@ void lbs_queue_cmd(struct lbs_private *priv, 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) { @@ -1195,7 +1195,7 @@ void lbs_queue_cmd(struct lbs_private *priv, 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); @@ -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); - 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); @@ -1786,8 +1779,7 @@ static void cleanup_cmdnode(struct cmd_ctrl_node *cmdnode) 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); } |