Commit 08cc0f44 authored by Colin Ian King's avatar Colin Ian King Committed by Kalle Valo

ath11k: fix uninitialized variable radioup

The variable radioup is not uninitalized so it may contain a garbage
value and hence the detection of a radio that is not up is buggy.
Fix this by initializing it to zero.

Addresses-Coverity: ("Uninitalized scalar variable")
Fixes: d5c65159 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent b5316db2
...@@ -541,7 +541,7 @@ static ssize_t ath11k_write_simulate_fw_crash(struct file *file, ...@@ -541,7 +541,7 @@ static ssize_t ath11k_write_simulate_fw_crash(struct file *file,
struct ath11k *ar = ab->pdevs[0].ar; struct ath11k *ar = ab->pdevs[0].ar;
char buf[32] = {0}; char buf[32] = {0};
ssize_t rc; ssize_t rc;
int i, ret, radioup; int i, ret, radioup = 0;
for (i = 0; i < ab->num_radios; i++) { for (i = 0; i < ab->num_radios; i++) {
pdev = &ab->pdevs[i]; pdev = &ab->pdevs[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment