]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: ath12k: cleanup ath12k_mac_mlo_ready()
authorEthan Carter Edwards <ethan@ethancedwards.com>
Tue, 11 Feb 2025 02:49:41 +0000 (21:49 -0500)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Tue, 18 Feb 2025 17:53:34 +0000 (09:53 -0800)
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 <ethan@ethancedwards.com>
Reviewed-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Link: https://patch.msgid.link/20250210-ath12k-uninit-v2-1-3596f28dd380@ethancedwards.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/core.c

index 0c556023141b00bf82238797d9764eaea6ce3f69..0b2dec081c6ee8ec1201ea923cb966271066843b 100644 (file)
@@ -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)