From: Dan Carpenter Date: Tue, 8 Sep 2020 06:22:03 +0000 (+0300) Subject: ath11k: fix uninitialized return in ath11k_spectral_process_data() X-Git-Tag: v5.10-rc1~107^2~309^2^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c7187acc3cd08a17e7b506b2b5277f42d1504d29;p=thirdparty%2Fkernel%2Flinux.git ath11k: fix uninitialized return in ath11k_spectral_process_data() 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 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200619142922.GA267142@mwanda --- diff --git a/drivers/net/wireless/ath/ath11k/spectral.c b/drivers/net/wireless/ath/ath11k/spectral.c index 6cbe6f4e28642..92fd8a4df1f2e 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: