diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2023-02-01 02:00:03 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-02-01 11:43:46 +0000 |
commit | c12dc0f6655bbf41d32a863b8e314f18f746fb0b (patch) | |
tree | e3f2fcfe012f3f9066e2a7869c11e753879c2402 /sound/soc/sh | |
parent | e5a3c491e194768f4899e8d1746301542cd7c1e8 (diff) |
ASoC: rsnd: indicate necessary error when clock start failed
rsnd_ssi_master_clk_start() indicates error message if it couldn't
handle requested clock/rate, but it is not caring all cases.
This patch cares it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874js66t7g.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r-- | sound/soc/sh/rcar/ssi.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 7ade6c5ed96f..8ddee5b03ece 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -303,15 +303,14 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod, return 0; } + ret = -EIO; main_rate = rsnd_ssi_clk_query(rdai, rate, chan, &idx); - if (!main_rate) { - dev_err(dev, "unsupported clock rate\n"); - return -EIO; - } + if (!main_rate) + goto rate_err; ret = rsnd_adg_ssi_clk_try_start(mod, main_rate); if (ret < 0) - return ret; + goto rate_err; /* * SSI clock will be output contiguously @@ -333,6 +332,10 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod, rsnd_mod_name(mod), chan, rate); return 0; + +rate_err: + dev_err(dev, "unsupported clock rate\n"); + return ret; } static void rsnd_ssi_master_clk_stop(struct rsnd_mod *mod, |