[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250210-ath12k-uninit-v2-1-3596f28dd380@ethancedwards.com>
Date: Mon, 10 Feb 2025 21:49:41 -0500
From: Ethan Carter Edwards <ethan@...ancedwards.com>
To: Jeff Johnson <jeff.johnson@....qualcomm.com>,
Karthikeyan Periyasamy <quic_periyasa@...cinc.com>
Cc: Kalle Valo <kvalo@...nel.org>, Jeff Johnson <jjohnson@...nel.org>,
Harshitha Prem <quic_hprem@...cinc.com>,
Kalle Valo <quic_kvalo@...cinc.com>, linux-wireless@...r.kernel.org,
ath12k@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org,
Ethan Carter Edwards <ethan@...ancedwards.com>
Subject: [PATCH v2] 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: b716a10d99a28 ("wifi: ath12k: enable MLO setup and teardown from core")
Signed-off-by: Ethan Carter Edwards <ethan@...ancedwards.com>
---
Changes in v2:
- Rewrite commit subject to include function
- put int ret; back at top of function declaration
- minor changes to description
- Link to v1: https://lore.kernel.org/r/20250209-ath12k-uninit-v1-1-afc8005847be@ethancedwards.com
---
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 0606116d6b9c491b6ede401b2e1aedfb619339a8..276f2ee553f4e3529abff14f2b9238ee0a78f45e 100644
--- a/drivers/net/wireless/ath/ath12k/core.c
+++ b/drivers/net/wireless/ath/ath12k/core.c
@@ -920,12 +920,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)
---
base-commit: a64dcfb451e254085a7daee5fe51bf22959d52d3
change-id: 20250209-ath12k-uninit-18560fd91c07
Best regards,
--
Ethan Carter Edwards <ethan@...ancedwards.com>
Powered by blists - more mailing lists