Commit 3edb059a authored by Ian Schram's avatar Ian Schram Committed by David S. Miller

iwlwifi: remove late null-check and duplicate bug_on

These pieces of code appear to be useless. The BUG_ON is also performed in
iwl_send_cmd_async.

Serious karma would be needed to enter iwl_ativate_qos with a null priv.
I had a deja vu when patching this, but for the life of me I couldn't track
down a similar patch.
Signed-off-by: default avatarIan Schram <ischram@telenet.be>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent bc434dd2
...@@ -808,10 +808,6 @@ int iwl_send_cmd_sync(struct iwl_priv *priv, struct iwl_host_cmd *cmd) ...@@ -808,10 +808,6 @@ int iwl_send_cmd_sync(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
int iwl_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) int iwl_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
{ {
/* A command can not be asynchronous AND expect an SKB to be set. */
BUG_ON((cmd->meta.flags & CMD_ASYNC) &&
(cmd->meta.flags & CMD_WANT_SKB));
if (cmd->meta.flags & CMD_ASYNC) if (cmd->meta.flags & CMD_ASYNC)
return iwl_send_cmd_async(priv, cmd); return iwl_send_cmd_async(priv, cmd);
...@@ -1968,9 +1964,6 @@ static void iwl_activate_qos(struct iwl_priv *priv, u8 force) ...@@ -1968,9 +1964,6 @@ static void iwl_activate_qos(struct iwl_priv *priv, u8 force)
{ {
unsigned long flags; unsigned long flags;
if (priv == NULL)
return;
if (test_bit(STATUS_EXIT_PENDING, &priv->status)) if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return; return;
......
...@@ -806,10 +806,6 @@ int iwl_send_cmd_sync(struct iwl_priv *priv, struct iwl_host_cmd *cmd) ...@@ -806,10 +806,6 @@ int iwl_send_cmd_sync(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
int iwl_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) int iwl_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
{ {
/* A command can not be asynchronous AND expect an SKB to be set. */
BUG_ON((cmd->meta.flags & CMD_ASYNC) &&
(cmd->meta.flags & CMD_WANT_SKB));
if (cmd->meta.flags & CMD_ASYNC) if (cmd->meta.flags & CMD_ASYNC)
return iwl_send_cmd_async(priv, cmd); return iwl_send_cmd_async(priv, cmd);
...@@ -2040,9 +2036,6 @@ static void iwl_activate_qos(struct iwl_priv *priv, u8 force) ...@@ -2040,9 +2036,6 @@ static void iwl_activate_qos(struct iwl_priv *priv, u8 force)
{ {
unsigned long flags; unsigned long flags;
if (priv == NULL)
return;
if (test_bit(STATUS_EXIT_PENDING, &priv->status)) if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return; return;
......
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