ath10k: initialize fw_features var
authorMichal Kazior <michal.kazior@tieto.com>
Wed, 5 Aug 2015 04:55:37 +0000 (06:55 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 13 Aug 2015 11:22:07 +0000 (14:22 +0300)
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>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/debug.c

index 1a33bf04b7b7d4567dcc6918551e91c7b9b9a7a6..f7aa1c73b4814968420dc50209b302a8a676c383 100644 (file)
@@ -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));