summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/dvm
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2012-12-31 15:15:36 +0400
committerJohannes Berg <johannes.berg@intel.com>2013-01-03 18:32:26 +0400
commit653ea7a6a5a912a96affc6443b6e9f42dfce2234 (patch)
tree363613d78e76e4ba66e2250ac94cdc9593082a56 /drivers/net/wireless/iwlwifi/dvm
parent4fd442db98dadf33ecce6d489bbbc95f6e8d3b31 (diff)
downloadlinux-653ea7a6a5a912a96affc6443b6e9f42dfce2234.tar.xz
iwlwifi: don't treat a bool as an error code
iwl_trans_grab_nic_access returns a boolean. So ret should explicitely set to an error code and not rely on the value returned by iwl_trans_grab_nic_access. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/dvm')
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/mac80211.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
index 9c1f055f4316..1ed4bc694d29 100644
--- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
@@ -459,11 +459,11 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw)
base = priv->device_pointers.error_event_table;
if (iwlagn_hw_valid_rtc_data_addr(base)) {
spin_lock_irqsave(&priv->trans->reg_lock, flags);
- ret = iwl_trans_grab_nic_access(priv->trans, true);
- if (likely(ret == 0)) {
+ if (iwl_trans_grab_nic_access(priv->trans, true)) {
iwl_write32(priv->trans, HBUS_TARG_MEM_RADDR, base);
status = iwl_read32(priv->trans, HBUS_TARG_MEM_RDAT);
iwl_trans_release_nic_access(priv->trans);
+ ret = 0;
}
spin_unlock_irqrestore(&priv->trans->reg_lock, flags);