From: sashiko-bot@kernel.org
To: "Ian Rogers" <irogers@google.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: typec: qcom-pmic-typec: Avoid reading uninitialized state on error paths
Date: Thu, 19 Nov 2026 17:15:35 +0000 [thread overview]
Message-ID: <sashiko-outbox-223671@kernel.org> (raw)
In-Reply-To: <20261119170853.1529676-1-irogers@google.com>
> In qcom_pmic_typec_port_set_cc(), error paths from regmap_read() and the
> default switch branch jump to 'done:', which logs 'currsrc', 'mode', and
> 'misc' via dev_dbg() and passes uninitialized 'currsrc' into
> rp_sel_to_name(), indexing rp_sel_name[] out-of-bounds when dynamic debug
> is enabled. Similarly, early error paths in qcom_pmic_typec_port_get_cc()
> jump to 'done:' before 'misc', 'attached', '*cc1', and '*cc2' are
> initialized.
>
> Return early on error paths in both functions instead of jumping to the
> post-success dev_dbg() trace.
>
> Found via an x86_64 LLVM=1 (Clang 21.1.8) allyesconfig audit with
> -Wconditional-uninitialized enabled; fix and changelog drafted with an AI
> coding assistant. Build-tested under LLVM=1 W=1 (-Werror) and
> -Wconditional-uninitialized; not tested on Qualcomm PMIC Type-C hardware.
>
> Fixes: a4422ff22142 ("usb: typec: qcom: Add Qualcomm PMIC Type-C driver")
> Signed-off-by: Ian Rogers <irogers@google.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261119170853.1529676-1-irogers@google.com?part=1
prev parent reply other threads:[~2026-11-19 17:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 17:08 [PATCH] usb: typec: qcom-pmic-typec: Avoid reading uninitialized state on error paths Ian Rogers
2026-11-19 17:15 ` sashiko-bot [this message]
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=sashiko-outbox-223671@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=irogers@google.com \
--cc=linux-usb@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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