Commit 6dde8c48 authored by Johannes Berg's avatar Johannes Berg Committed by Emmanuel Grumbach

iwlwifi: pcie: remove useless condition test

After wait_event_timeout(), the condition must still be
true if it returns >0, in fact almost the last thing in
it is checking the condition again. It's therefore not
useful to check yet again in our code, clean it up.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 119663c3
...@@ -1542,23 +1542,18 @@ static int iwl_pcie_send_hcmd_sync(struct iwl_trans *trans, ...@@ -1542,23 +1542,18 @@ static int iwl_pcie_send_hcmd_sync(struct iwl_trans *trans,
} }
if (!ret) { if (!ret) {
if (test_bit(STATUS_HCMD_ACTIVE, &trans_pcie->status)) { struct iwl_txq *txq = &trans_pcie->txq[trans_pcie->cmd_queue];
struct iwl_txq *txq =
&trans_pcie->txq[trans_pcie->cmd_queue];
struct iwl_queue *q = &txq->q; struct iwl_queue *q = &txq->q;
IWL_ERR(trans, IWL_ERR(trans, "Error sending %s: time out after %dms.\n",
"Error sending %s: time out after %dms.\n",
get_cmd_string(trans_pcie, cmd->id), get_cmd_string(trans_pcie, cmd->id),
jiffies_to_msecs(HOST_COMPLETE_TIMEOUT)); jiffies_to_msecs(HOST_COMPLETE_TIMEOUT));
IWL_ERR(trans, IWL_ERR(trans, "Current CMD queue read_ptr %d write_ptr %d\n",
"Current CMD queue read_ptr %d write_ptr %d\n",
q->read_ptr, q->write_ptr); q->read_ptr, q->write_ptr);
clear_bit(STATUS_HCMD_ACTIVE, &trans_pcie->status); clear_bit(STATUS_HCMD_ACTIVE, &trans_pcie->status);
IWL_DEBUG_INFO(trans, IWL_DEBUG_INFO(trans, "Clearing HCMD_ACTIVE for command %s\n",
"Clearing HCMD_ACTIVE for command %s\n",
get_cmd_string(trans_pcie, cmd->id)); get_cmd_string(trans_pcie, cmd->id));
ret = -ETIMEDOUT; ret = -ETIMEDOUT;
...@@ -1566,7 +1561,6 @@ static int iwl_pcie_send_hcmd_sync(struct iwl_trans *trans, ...@@ -1566,7 +1561,6 @@ static int iwl_pcie_send_hcmd_sync(struct iwl_trans *trans,
goto cancel; goto cancel;
} }
}
if (test_bit(STATUS_FW_ERROR, &trans_pcie->status)) { if (test_bit(STATUS_FW_ERROR, &trans_pcie->status)) {
IWL_ERR(trans, "FW error in SYNC CMD %s\n", IWL_ERR(trans, "FW error in SYNC CMD %s\n",
......
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