From ceb3b35f5ef4a0c490f54eb8b53075fd83a97d11 Mon Sep 17 00:00:00 2001 From: Ethan Carter Edwards Date: Mon, 10 Feb 2025 21:49:41 -0500 Subject: [PATCH] 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 --- drivers/net/wireless/ath/ath12k/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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) -- 2.50.1