diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-04-10 11:32:58 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-06-23 00:12:59 +0300 |
commit | 0ec971fdaddfcab72e5104e35774f489991f1f68 (patch) | |
tree | c13780b1cacf93a6d4a8cfc6d37d43e90d5dda6d /drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | |
parent | 664e968be329352d2ed2566e43965a25421b1646 (diff) | |
download | linux-0ec971fdaddfcab72e5104e35774f489991f1f68.tar.xz |
iwlwifi: remove resp_pkt NULL checks
Contrary to what some of the comments say, if rfkill was
asserted the transport will return -ERFKILL instead of
success, if CMD_WANT_SKB was set, so it's not necessary
to check cmd.resp_pkt for being NULL if the return code
was success.
Validate that this is true in iwl_trans_send_cmd().
Most of the other code modifications were done with the
following spatch:
@@
struct iwl_host_cmd cmd;
identifier pkt;
@@
<...
(
pkt = cmd.resp_pkt;
...
-if (!pkt) { ... }
|
pkt = cmd.resp_pkt;
...
-if (WARN_ON(!pkt)) { ... }
|
-if (!cmd.resp_pkt) { ... }
)
...>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/nvm.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c index 87b9ebfc653e..beead0bc08c9 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c @@ -118,10 +118,6 @@ static int iwl_nvm_write_chunk(struct iwl_mvm *mvm, u16 section, return ret; pkt = cmd.resp_pkt; - if (!pkt) { - IWL_ERR(mvm, "Error in NVM_ACCESS response\n"); - return -EINVAL; - } /* Extract & check NVM write response */ nvm_resp = (void *)pkt->data; if (le16_to_cpu(nvm_resp->status) != READ_NVM_CHUNK_SUCCEED) { |