瀏覽代碼

ath10k: initialize fw_features var

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>
Michal Kazior 10 年之前
父節點
當前提交
84e3df60f0
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/wireless/ath/ath10k/debug.c

+ 1 - 1
drivers/net/wireless/ath/ath10k/debug.c

@@ -124,7 +124,7 @@ EXPORT_SYMBOL(ath10k_info);
 
 
 void ath10k_print_driver_info(struct ath10k *ar)
 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));
 	ath10k_core_get_fw_features_str(ar, fw_features, sizeof(fw_features));