From: Peter Ujfalusi <peter.ujfalusi@gmail.com>
To: broonie@kernel.org
Cc: alsa-devel@alsa-project.org, lgirdwood@gmail.com
Subject: [PATCH 2/3] ASoC: ti: j721e-evm: Check for not initialized parent_clk_id
Date: Sat, 17 Jul 2021 15:28:19 +0300 [thread overview]
Message-ID: <20210717122820.1467-3-peter.ujfalusi@gmail.com> (raw)
In-Reply-To: <20210717122820.1467-1-peter.ujfalusi@gmail.com>
During probe the parent_clk_id is set to -1 which should not be used to
array index within hsdiv_rates[].
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
---
sound/soc/ti/j721e-evm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/ti/j721e-evm.c b/sound/soc/ti/j721e-evm.c
index 017c4ad11ca6..265bbc5a2f96 100644
--- a/sound/soc/ti/j721e-evm.c
+++ b/sound/soc/ti/j721e-evm.c
@@ -197,7 +197,7 @@ static int j721e_configure_refclk(struct j721e_priv *priv,
return ret;
}
- if (priv->hsdiv_rates[domain->parent_clk_id] != scki) {
+ if (domain->parent_clk_id == -1 || priv->hsdiv_rates[domain->parent_clk_id] != scki) {
dev_dbg(priv->dev,
"%s configuration for %u Hz: %s, %dxFS (SCKI: %u Hz)\n",
audio_domain == J721E_AUDIO_DOMAIN_CPB ? "CPB" : "IVI",
--
2.32.0
next prev parent reply other threads:[~2021-07-17 12:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-17 12:28 [PATCH 0/3] ASoC: ti: j721e-evm: Small fixes and code cleanup Peter Ujfalusi
2021-07-17 12:28 ` [PATCH 1/3] ASoC: ti: j721e-evm: Fix unbalanced domain activity tracking during startup Peter Ujfalusi
2021-07-17 12:28 ` Peter Ujfalusi [this message]
2021-07-17 12:28 ` [PATCH 3/3] ASoC: ti: j721e-evm: Convert the audio domain IDs to enum Peter Ujfalusi
2021-07-19 14:37 ` (subset) [PATCH 0/3] ASoC: ti: j721e-evm: Small fixes and code cleanup Mark Brown
2021-07-19 15:42 ` Mark Brown
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=20210717122820.1467-3-peter.ujfalusi@gmail.com \
--to=peter.ujfalusi@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.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;
as well as URLs for NNTP newsgroup(s).