diff options
author | Frederic Danis <frederic.danis@linux.intel.com> | 2014-06-02 21:19:46 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2014-07-14 15:49:23 +0300 |
commit | 1c3d95edf026c6fb446f53913c61ff1036c469cd (patch) | |
tree | 957787e08270916c6cc7e2331d1fc55767238b81 /drivers/net/wireless/ath/ath6kl/bmi.h | |
parent | d385623a78145889692074c170ecac7232e547ab (diff) |
ath6kl: Fix ath6kl_bmi_read_hi32 macro
tmp may be used uninitialized if ath6kl_bmi_read() 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/wireless/ath/ath6kl/bmi.h')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/bmi.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/bmi.h b/drivers/net/wireless/ath/ath6kl/bmi.h index 18fdd69e1f71..397a52f2628b 100644 --- a/drivers/net/wireless/ath/ath6kl/bmi.h +++ b/drivers/net/wireless/ath/ath6kl/bmi.h @@ -242,7 +242,8 @@ struct ath6kl_bmi_target_info { (void) (check_type == val); \ addr = ath6kl_get_hi_item_addr(ar, HI_ITEM(item)); \ ret = ath6kl_bmi_read(ar, addr, (u8 *) &tmp, 4); \ - *val = le32_to_cpu(tmp); \ + if (!ret) \ + *val = le32_to_cpu(tmp); \ ret; \ }) |