aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Schram <ischram@telenet.be>2007-10-25 05:15:30 -0400
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:03:13 -0500
commit3edb059a40469fd058806c47f9f122dfee38b36c (patch)
tree5d3ed7cdfc8af13ba402ac914e3907f74ac84c3f
parentbc434dd2961763d33836f6e2e119e1d4a6325e4d (diff)
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: Ian Schram <ischram@telenet.be> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c7
2 files changed, 0 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 5041368a9a20..c6606e1af51d 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -808,10 +808,6 @@ out:
808 808
809int iwl_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) 809int iwl_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
810{ 810{
811 /* A command can not be asynchronous AND expect an SKB to be set. */
812 BUG_ON((cmd->meta.flags & CMD_ASYNC) &&
813 (cmd->meta.flags & CMD_WANT_SKB));
814
815 if (cmd->meta.flags & CMD_ASYNC) 811 if (cmd->meta.flags & CMD_ASYNC)
816 return iwl_send_cmd_async(priv, cmd); 812 return iwl_send_cmd_async(priv, cmd);
817 813
@@ -1968,9 +1964,6 @@ static void iwl_activate_qos(struct iwl_priv *priv, u8 force)
1968{ 1964{
1969 unsigned long flags; 1965 unsigned long flags;
1970 1966
1971 if (priv == NULL)
1972 return;
1973
1974 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 1967 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
1975 return; 1968 return;
1976 1969
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 076c5518211b..fa11eb95699b 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -806,10 +806,6 @@ out:
806 806
807int iwl_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) 807int iwl_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
808{ 808{
809 /* A command can not be asynchronous AND expect an SKB to be set. */
810 BUG_ON((cmd->meta.flags & CMD_ASYNC) &&
811 (cmd->meta.flags & CMD_WANT_SKB));
812
813 if (cmd->meta.flags & CMD_ASYNC) 809 if (cmd->meta.flags & CMD_ASYNC)
814 return iwl_send_cmd_async(priv, cmd); 810 return iwl_send_cmd_async(priv, cmd);
815 811
@@ -2040,9 +2036,6 @@ static void iwl_activate_qos(struct iwl_priv *priv, u8 force)
2040{ 2036{
2041 unsigned long flags; 2037 unsigned long flags;
2042 2038
2043 if (priv == NULL)
2044 return;
2045
2046 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 2039 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
2047 return; 2040 return;
2048 2041