diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2012-12-31 13:46:42 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-03 15:34:11 +0100 |
commit | abae2386d55aff1d395cdb665f03684c227a6a69 (patch) | |
tree | dfa4d78c306f6a17d7c6b170531b760c17055af4 /drivers/net/wireless/iwlwifi/dvm | |
parent | c8f9b0feab564e1ecf460b440e838673aced282c (diff) | |
download | blackbird-op-linux-abae2386d55aff1d395cdb665f03684c227a6a69.tar.gz blackbird-op-linux-abae2386d55aff1d395cdb665f03684c227a6a69.zip |
iwlwifi: always check that grab_nic_access succeeds
This allows to let sparse check that the NIC access is
always released.
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/main.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/tt.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c index 517d7ae549d3..a64f361e341c 100644 --- a/drivers/net/wireless/iwlwifi/dvm/main.c +++ b/drivers/net/wireless/iwlwifi/dvm/main.c @@ -354,7 +354,7 @@ static void iwl_print_cont_event_trace(struct iwl_priv *priv, u32 base, /* Make sure device is powered up for SRAM reads */ spin_lock_irqsave(&priv->trans->reg_lock, reg_flags); - if (unlikely(!iwl_trans_grab_nic_access(priv->trans, false))) { + if (!iwl_trans_grab_nic_access(priv->trans, false)) { spin_unlock_irqrestore(&priv->trans->reg_lock, reg_flags); return; } @@ -1718,7 +1718,7 @@ static int iwl_print_event_log(struct iwl_priv *priv, u32 start_idx, /* Make sure device is powered up for SRAM reads */ spin_lock_irqsave(&trans->reg_lock, reg_flags); - if (unlikely(!iwl_trans_grab_nic_access(trans, false))) + if (!iwl_trans_grab_nic_access(trans, false)) goto out_unlock; /* Set starting address; reads will auto-increment */ diff --git a/drivers/net/wireless/iwlwifi/dvm/tt.c b/drivers/net/wireless/iwlwifi/dvm/tt.c index a8ae51307db4..b28cfc8553d7 100644 --- a/drivers/net/wireless/iwlwifi/dvm/tt.c +++ b/drivers/net/wireless/iwlwifi/dvm/tt.c @@ -186,7 +186,7 @@ static void iwl_tt_check_exit_ct_kill(unsigned long data) } iwl_read32(priv->trans, CSR_UCODE_DRV_GP1); spin_lock_irqsave(&priv->trans->reg_lock, flags); - if (likely(iwl_trans_grab_nic_access(priv->trans, false))) + if (iwl_trans_grab_nic_access(priv->trans, false)) iwl_trans_release_nic_access(priv->trans); spin_unlock_irqrestore(&priv->trans->reg_lock, flags); |