OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78d2a05
)
ASoC: ti: j721e-evm: Check for not initialized parent_clk_id
author
Peter Ujfalusi
<peter.ujfalusi@gmail.com>
Sat, 17 Jul 2021 12:28:19 +0000
(15:28 +0300)
committer
Mark Brown
<broonie@kernel.org>
Mon, 19 Jul 2021 11:58:42 +0000
(12:58 +0100)
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>
sound/soc/ti/j721e-evm.c
patch
|
blob
|
history
diff --git
a/sound/soc/ti/j721e-evm.c
b/sound/soc/ti/j721e-evm.c
index
017c4ad
..
265bbc5
100644
(file)
--- 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",