[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220901071127.3448059-1-jiasheng@iscas.ac.cn>
Date: Thu, 1 Sep 2022 15:11:27 +0800
From: Jiasheng Jiang <jiasheng@...as.ac.cn>
To: lgirdwood@...il.com, broonie@...nel.org, perex@...ex.cz,
tiwai@...e.com, kuninori.morimoto.gx@...esas.com
Cc: alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
Jiasheng Jiang <jiasheng@...as.ac.cn>
Subject: [PATCH] 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@...as.ac.cn>
---
sound/soc/sh/rcar/ssi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index 43c5e27dc5c8..7ade6c5ed96f 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -480,7 +480,9 @@ static int rsnd_ssi_init(struct rsnd_mod *mod,
ssi->usrcnt++;
- rsnd_mod_power_on(mod);
+ ret = rsnd_mod_power_on(mod);
+ if (ret < 0)
+ return ret;
rsnd_ssi_config_init(mod, io);
--
2.25.1
Powered by blists - more mailing lists