From: Frederic Danis <frederic.danis@linux.intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, kvalo@qca.qualcomm.com,
Frederic Danis <frederic.danis@linux.intel.com>
Subject: [PATCH] ath6kl: Fix ath6kl_bmi_read_hi32 macro
Date: Fri, 16 May 2014 16:11:44 +0200 [thread overview]
Message-ID: <1400249504-23739-1-git-send-email-frederic.danis@linux.intel.com> (raw)
tmp may be used uninitialized if ath6kl_bmi_read() returns an error.
Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com>
---
drivers/net/wireless/ath/ath6kl/bmi.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath6kl/bmi.h b/drivers/net/wireless/ath/ath6kl/bmi.h
index 18fdd69..397a52f 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; \
})
--
1.7.9.5
next reply other threads:[~2014-05-16 14:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 14:11 Frederic Danis [this message]
2014-05-28 13:52 ` [PATCH] ath6kl: Fix ath6kl_bmi_read_hi32 macro Kalle Valo
2014-06-02 12:17 ` [PATCH v2] " Frederic Danis
2014-07-14 12:50 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1400249504-23739-1-git-send-email-frederic.danis@linux.intel.com \
--to=frederic.danis@linux.intel.com \
--cc=kvalo@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).