summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-10-28 15:50:55 +0100
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2013-10-29 14:51:50 +0100
commitbcbb8c9c7d42e012d8f73dfcccfcc56d5c8da431 (patch)
tree05293562d66bcd5cd01c69f51f6b5074d3e90f88 /drivers/net
parentiwlwifi: mvm: BT Coex fix NULL pointer dereference (diff)
downloadlinux-bcbb8c9c7d42e012d8f73dfcccfcc56d5c8da431.tar.xz
linux-bcbb8c9c7d42e012d8f73dfcccfcc56d5c8da431.zip
iwlwifi: pcie: move warning message into warning
Having a WARN_ON() followed by a printed message is less useful than having the message in the warning so move the message. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/tx.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/tx.c b/drivers/net/wireless/iwlwifi/pcie/tx.c
index b4168415538c..cc184402b88a 100644
--- a/drivers/net/wireless/iwlwifi/pcie/tx.c
+++ b/drivers/net/wireless/iwlwifi/pcie/tx.c
@@ -1495,12 +1495,11 @@ static int iwl_pcie_send_hcmd_sync(struct iwl_trans *trans,
IWL_DEBUG_INFO(trans, "Attempting to send sync command %s\n",
get_cmd_string(trans_pcie, cmd->id));
- if (WARN_ON(test_and_set_bit(STATUS_HCMD_ACTIVE,
- &trans_pcie->status))) {
- IWL_ERR(trans, "Command %s: a command is already active!\n",
- get_cmd_string(trans_pcie, cmd->id));
+ if (WARN(test_and_set_bit(STATUS_HCMD_ACTIVE,
+ &trans_pcie->status),
+ "Command %s: a command is already active!\n",
+ get_cmd_string(trans_pcie, cmd->id)))
return -EIO;
- }
IWL_DEBUG_INFO(trans, "Setting HCMD_ACTIVE for command %s\n",
get_cmd_string(trans_pcie, cmd->id));