From: Ethan Carter Edwards <ethan@ethancedwards.com>
To: Jeff Johnson <jeff.johnson@oss.qualcomm.com>,
Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Cc: Kalle Valo <kvalo@kernel.org>, Jeff Johnson <jjohnson@kernel.org>,
Harshitha Prem <quic_hprem@quicinc.com>,
Kalle Valo <quic_kvalo@quicinc.com>,
linux-wireless@vger.kernel.org, ath12k@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
Ethan Carter Edwards <ethan@ethancedwards.com>
Subject: [PATCH v2] wifi: ath12k: cleanup ath12k_mac_mlo_ready()
Date: Mon, 10 Feb 2025 21:49:41 -0500 [thread overview]
Message-ID: <20250210-ath12k-uninit-v2-1-3596f28dd380@ethancedwards.com> (raw)
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@ethancedwards.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@ethancedwards.com>
next reply other threads:[~2025-02-11 2:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-11 2:49 Ethan Carter Edwards [this message]
2025-02-11 17:32 ` Aditya Kumar Singh
2025-02-12 16:54 ` Jeff Johnson
2025-02-18 17:56 ` Jeff Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250210-ath12k-uninit-v2-1-3596f28dd380@ethancedwards.com \
--to=ethan@ethancedwards.com \
--cc=ath12k@lists.infradead.org \
--cc=jeff.johnson@oss.qualcomm.com \
--cc=jjohnson@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_hprem@quicinc.com \
--cc=quic_kvalo@quicinc.com \
--cc=quic_periyasa@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®