diff options
author | Frederic Danis <frederic.danis@linux.intel.com> | 2014-05-23 11:04:49 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2014-05-23 11:29:23 +0300 |
commit | afe5b7b4db0c95f22cdcbc02e0b021887faae277 (patch) | |
tree | ac49972b7cfad53e30df31243e6226ee09abac31 /drivers/net | |
parent | f2708bedf2bec33cab077defe0587497e203284d (diff) | |
download | talos-op-linux-afe5b7b4db0c95f22cdcbc02e0b021887faae277.tar.gz talos-op-linux-afe5b7b4db0c95f22cdcbc02e0b021887faae277.zip |
ath10k: fix ath10k_bmi_read32 macro
tmp may be used uninitialized if ath10k_bmi_read_memory() returns
an error.
Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/bmi.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/bmi.h b/drivers/net/wireless/ath/ath10k/bmi.h index 3a9bdf51c96a..111ab701465c 100644 --- a/drivers/net/wireless/ath/ath10k/bmi.h +++ b/drivers/net/wireless/ath/ath10k/bmi.h @@ -201,7 +201,8 @@ int ath10k_bmi_write_memory(struct ath10k *ar, u32 address, \ addr = host_interest_item_address(HI_ITEM(item)); \ ret = ath10k_bmi_read_memory(ar, addr, (u8 *)&tmp, 4); \ - *val = __le32_to_cpu(tmp); \ + if (!ret) \ + *val = __le32_to_cpu(tmp); \ ret; \ }) |