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: 9d11b7bff9 ("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
This commit is contained in:
Dan Carpenter 2020-09-08 09:22:03 +03:00 committed by Kalle Valo
parent 7e8453e35e
commit c7187acc3c
1 changed files with 2 additions and 0 deletions

View 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: