Skip to content

Commit 82d28b6

Browse files
ujfalusibroonie
authored andcommitted
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>
1 parent 78d2a05 commit 82d28b6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/soc/ti/j721e-evm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static int j721e_configure_refclk(struct j721e_priv *priv,
197197
return ret;
198198
}
199199

200-
if (priv->hsdiv_rates[domain->parent_clk_id] != scki) {
200+
if (domain->parent_clk_id == -1 || priv->hsdiv_rates[domain->parent_clk_id] != scki) {
201201
dev_dbg(priv->dev,
202202
"%s configuration for %u Hz: %s, %dxFS (SCKI: %u Hz)\n",
203203
audio_domain == J721E_AUDIO_DOMAIN_CPB ? "CPB" : "IVI",

0 commit comments

Comments
 (0)