]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ath11k: fix uninitialized return in ath11k_spectral_process_data()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 8 Sep 2020 06:22:03 +0000 (09:22 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:11:18 +0000 (10:11 +0100)
[ Upstream commit c7187acc3cd08a17e7b506b2b5277f42d1504d29 ]

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@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200619142922.GA267142@mwanda
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath11k/spectral.c

index 1c5d65bb411f72ac902a87e912da46b2ed6a5ae0..6d6a7e34645f21ad894f6bde838d9fda050978fc 100644 (file)
@@ -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: