Skip to content

Commit

Permalink
ASoC: ti: j721e-evm: Check for not initialized parent_clk_id
Browse files Browse the repository at this point in the history
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
ujfalusi authored and broonie committed Jul 19, 2021
1 parent 78d2a05 commit 82d28b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/ti/j721e-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 82d28b6

Please sign in to comment.