[PATCH 267/379][SRU][OEM-5.6] ath11k: fix uninitialized return in ath11k_spectral_process_data()
You-Sheng Yang
vicamo.yang at canonical.com
Wed Dec 23 08:50:00 UTC 2020
From: Dan Carpenter <dan.carpenter at oracle.com>
BugLink: https://bugs.launchpad.net/bugs/1879633
There is a success path where "ret" isn't initialized where we never
have a ATH11K_SPECTRAL_TAG_SCAN_SEARCH and then ret isn't initialized.
Fixes: 9d11b7bff950 ("ath11k: add support for spectral scan")
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
Signed-off-by: Kalle Valo <kvalo at codeaurora.org>
Link: https://lore.kernel.org/r/20200619142922.GA267142@mwanda
(cherry picked from commit c7187acc3cd08a17e7b506b2b5277f42d1504d29)
Signed-off-by: You-Sheng Yang <vicamo.yang at canonical.com>
---
drivers/net/wireless/ath/ath11k/spectral.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/spectral.c b/drivers/net/wireless/ath/ath11k/spectral.c
index 6cbe6f4e2864..92fd8a4df1f2 100644
--- a/drivers/net/wireless/ath/ath11k/spectral.c
+++ b/drivers/net/wireless/ath/ath11k/spectral.c
@@ -773,6 +773,8 @@ static int ath11k_spectral_process_data(struct ath11k *ar,
i += sizeof(*tlv) + tlv_len;
}
+ ret = 0;
+
err:
kfree(fft_sample);
unlock:
--
2.29.2
More information about the kernel-team
mailing list