diff options
author | Jiasheng Jiang <jiasheng@iscas.ac.cn> | 2022-09-02 04:30:30 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-09-02 15:27:16 +0300 |
commit | 376be51caf8871419bbcbb755e1e615d30dc3153 (patch) | |
tree | dc5ff914f4dfa30b5e54b3f49fbfb4ea5b662d57 /sound/soc/sh/rcar/src.c | |
parent | 55e2bd9c41e800638676dce3f19dcfd16b309a08 (diff) | |
download | linux-376be51caf8871419bbcbb755e1e615d30dc3153.tar.xz |
ASoC: rsnd: Add check for rsnd_mod_power_on
As rsnd_mod_power_on() can return negative numbers,
it should be better to check the return value and
deal with the exception.
Fixes: e7d850dd10f4 ("ASoC: rsnd: use mod base common method on SSI-parent")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/20220902013030.3691266-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar/src.c')
-rw-r--r-- | sound/soc/sh/rcar/src.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index 0ea84ae57c6a..f832165e46bc 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c @@ -463,11 +463,14 @@ static int rsnd_src_init(struct rsnd_mod *mod, struct rsnd_priv *priv) { struct rsnd_src *src = rsnd_mod_to_src(mod); + int ret; /* reset sync convert_rate */ src->sync.val = 0; - rsnd_mod_power_on(mod); + ret = rsnd_mod_power_on(mod); + if (ret < 0) + return ret; rsnd_src_activation(mod); |