diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-02-05 01:46:43 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-02-06 18:44:18 +0100 |
commit | d9111d36024de07784f2e1ba2ccf70b16035f378 (patch) | |
tree | 850dbea28a22a85b578af0182d8b9860155760bd /sound | |
parent | ASoC: dapm: fix out-of-bounds accesses to DAPM lookup tables (diff) | |
download | linux-d9111d36024de07784f2e1ba2ccf70b16035f378.tar.xz linux-d9111d36024de07784f2e1ba2ccf70b16035f378.zip |
ASoC: rsnd: fixup rsnd_ssi_master_clk_start() user count check
commit 4d230d1271064 ("ASoC: rsnd: fixup not to call clk_get/set
under non-atomic") added new rsnd_ssi_prepare() and moved
rsnd_ssi_master_clk_start() to .prepare.
But, ssi user count (= ssi->usrcnt) is incremented at .init
(= rsnd_ssi_init()).
Because of these timing exchange, ssi->usrcnt check at
rsnd_ssi_master_clk_start() should be adjusted.
Otherwise, 2nd master clock setup will be no check.
This patch fixup this issue.
Fixes: commit 4d230d1271064 ("ASoC: rsnd: fixup not to call clk_get/set under non-atomic")
Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Reported-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/sh/rcar/ssi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 45ef295743ec..f5afab631abb 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -286,7 +286,7 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod, if (rsnd_ssi_is_multi_slave(mod, io)) return 0; - if (ssi->usrcnt > 1) { + if (ssi->usrcnt > 0) { if (ssi->rate != rate) { dev_err(dev, "SSI parent/child should use same rate\n"); return -EINVAL; |