diff options
author | Peter Ujfalusi <peter.ujfalusi@gmail.com> | 2021-07-17 15:28:19 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-07-19 12:58:42 +0100 |
commit | 82d28b67f780910f816fe1cfb0f676fc38c4cbb3 (patch) | |
tree | 9d823a68b90552e37cd14a8046997539b87fe915 /sound/soc/ti | |
parent | 78d2a05ef22e7b5863b01e073dd6a06b3979bb00 (diff) | |
download | linux-stable-82d28b67f780910f816fe1cfb0f676fc38c4cbb3.tar.gz linux-stable-82d28b67f780910f816fe1cfb0f676fc38c4cbb3.tar.bz2 linux-stable-82d28b67f780910f816fe1cfb0f676fc38c4cbb3.zip |
ASoC: ti: j721e-evm: Check for not initialized parent_clk_id
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>
Link: https://lore.kernel.org/r/20210717122820.1467-3-peter.ujfalusi@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/ti')
-rw-r--r-- | sound/soc/ti/j721e-evm.c | 2 |
1 files changed, 1 insertions, 1 deletions
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", |