From: Ethan Carter Edwards Date: Tue, 11 Feb 2025 02:49:41 +0000 (-0500) Subject: wifi: ath12k: cleanup ath12k_mac_mlo_ready() X-Git-Tag: v6.15-rc1~160^2~20^2~87^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ceb3b35f5ef4a0c490f54eb8b53075fd83a97d11;p=thirdparty%2Fkernel%2Fstable.git wifi: ath12k: cleanup ath12k_mac_mlo_ready() There is a possibility for an uninitialized *ret* variable to be returned in some code paths. This explicitly returns 0 without an error. Also removes goto that returned *ret* and simply returns in place. Closes: https://scan5.scan.coverity.com/#/project-view/63541/10063?selectedIssue=1642337 Fixes: b716a10d99a2 ("wifi: ath12k: enable MLO setup and teardown from core") Signed-off-by: Ethan Carter Edwards Reviewed-by: Aditya Kumar Singh Link: https://patch.msgid.link/20250210-ath12k-uninit-v2-1-3596f28dd380@ethancedwards.com Signed-off-by: Jeff Johnson --- diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c index 0c556023141b0..0b2dec081c6ee 100644 --- a/drivers/net/wireless/ath/ath12k/core.c +++ b/drivers/net/wireless/ath/ath12k/core.c @@ -961,12 +961,11 @@ int ath12k_mac_mlo_ready(struct ath12k_hw_group *ag) ar = &ah->radio[j]; ret = __ath12k_mac_mlo_ready(ar); if (ret) - goto out; + return ret; } } -out: - return ret; + return 0; } static int ath12k_core_mlo_setup(struct ath12k_hw_group *ag)