From: "Colin King (gmail)" <colin.i.king@gmail.com>
To: Jack Yu <jack.yu@realtek.com>, Mark Brown <broonie@kernel.org>
Cc: linux-sound@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: re: ASoC: rt721-sdca: Add RT721 SDCA driver
Date: Tue, 8 Oct 2024 18:18:50 +0100 [thread overview]
Message-ID: <cf3c5ed3-69bb-4ff0-8377-29cb6fe7a358@gmail.com> (raw)
Hi Jack,
There is an unsigned variable check in commit:
commit 86ce355c1f9ab943bbe099ea7d0b8a3af2247f65
Author: Jack Yu <jack.yu@realtek.com>
Date: Tue Oct 1 09:17:38 2024 +0000
ASoC: rt721-sdca: Add RT721 SDCA driver
function rt721_sdca_jack_detect_handler, the following code does not
initialize variable ret:
int btn_type = 0, ret;
if (!rt721->hs_jack)
return;
if (!rt721->component->card ||
!rt721->component->card->instantiated)
return;
/* SDW_SCP_SDCA_INT_SDCA_6 is used for jack detection */
if (rt721->scp_sdca_stat1 & SDW_SCP_SDCA_INT_SDCA_6) {
rt721->jack_type = rt_sdca_headset_detect(rt721->regmap,
RT721_SDCA_ENT_GE49);
if (ret < 0)
return;
}
..and there is a check for ret < 0, even though it's not been assigned.
Should that be a check on rtl->jack_type < 0 instead?
Colin
next reply other threads:[~2024-10-08 17:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 17:18 Colin King (gmail) [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-08 17:02 Colin King (gmail)
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=cf3c5ed3-69bb-4ff0-8377-29cb6fe7a358@gmail.com \
--to=colin.i.king@gmail.com \
--cc=broonie@kernel.org \
--cc=jack.yu@realtek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
/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®