* [PATCH] ath10k: Fix ath10k_bmi_read32 macro
@ 2014-05-16 14:13 Frederic Danis
2014-05-23 8:31 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Frederic Danis @ 2014-05-16 14:13 UTC (permalink / raw)
To: linville; +Cc: kvalo, linux-wireless, Frederic Danis, ath10k
tmp may be used uninitialized if ath10k_bmi_read_memory() returns
an error.
Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com>
---
drivers/net/wireless/ath/ath10k/bmi.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/bmi.h b/drivers/net/wireless/ath/ath10k/bmi.h
index 3a9bdf51..111ab70 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; \
})
--
1.7.9.5
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-23 8:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-16 14:13 [PATCH] ath10k: Fix ath10k_bmi_read32 macro Frederic Danis
2014-05-23 8:31 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox