diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-12-12 20:10:44 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-12-18 18:52:43 +0100 |
commit | 08cc0f44f5ed5b5a91370f99929730dc3fe94b68 (patch) | |
tree | aad874529ba296dd8e91266e6a79af5fcd19ea3c /drivers/net/wireless/ath/ath11k/debug.c | |
parent | ath11k: fix memory leak on reg_info (diff) | |
download | linux-08cc0f44f5ed5b5a91370f99929730dc3fe94b68.tar.xz linux-08cc0f44f5ed5b5a91370f99929730dc3fe94b68.zip |
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: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/debug.c')
-rw-r--r-- | drivers/net/wireless/ath/ath11k/debug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath11k/debug.c b/drivers/net/wireless/ath/ath11k/debug.c index e00b5739fb00..f48daf17f2d2 100644 --- a/drivers/net/wireless/ath/ath11k/debug.c +++ b/drivers/net/wireless/ath/ath11k/debug.c @@ -541,7 +541,7 @@ static ssize_t ath11k_write_simulate_fw_crash(struct file *file, struct ath11k *ar = ab->pdevs[0].ar; char buf[32] = {0}; ssize_t rc; - int i, ret, radioup; + int i, ret, radioup = 0; for (i = 0; i < ab->num_radios; i++) { pdev = &ab->pdevs[i]; |