diff mbox

ath10k: initialize fw_features var

Message ID 1438750537-27781-1-git-send-email-michal.kazior@tieto.com (mailing list archive)
State Accepted
Headers show

Commit Message

Michal Kazior Aug. 5, 2015, 4:55 a.m. UTC
If firmware did not have any feature flags set the
var would be left with values found on the stack
(i.e. garbage) yielding print string like this:

  (...) features \xffffffa6m:^R\xfffffffb?\xffffffc4^E

Fixes: b27bc5a40f91 ("ath10k: dump fw features during probing")
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo Aug. 13, 2015, 11:22 a.m. UTC | #1
Michal Kazior <michal.kazior@tieto.com> writes:

> If firmware did not have any feature flags set the
> var would be left with values found on the stack
> (i.e. garbage) yielding print string like this:
>
>   (...) features \xffffffa6m:^R\xfffffffb?\xffffffc4^E
>
> Fixes: b27bc5a40f91 ("ath10k: dump fw features during probing")
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>

Thanks, applied.
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index 1a33bf04b7b7..f7aa1c73b481 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -124,7 +124,7 @@  EXPORT_SYMBOL(ath10k_info);
 
 void ath10k_print_driver_info(struct ath10k *ar)
 {
-	char fw_features[128];
+	char fw_features[128] = {};
 
 	ath10k_core_get_fw_features_str(ar, fw_features, sizeof(fw_features));