All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [PATCH 04/15] ASoC: rsnd: indicate necessary error when clock start failed
Date: Wed, 1 Feb 2023 02:00:03 +0000	[thread overview]
Message-ID: <874js66t7g.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87a61y6t8e.wl-kuninori.morimoto.gx@renesas.com>

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

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>
---
 sound/soc/sh/rcar/ssi.c | 13 ++++++++-----
 1 file 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,
-- 
2.25.1


  parent reply	other threads:[~2023-02-01  2:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-01  1:59 [PATCH 00/15] ASoC: rsnd: cleanup add R-Car Gen4 Sound support Kuninori Morimoto
2023-02-01  1:59 ` [PATCH 01/15] ASoC: rsnd: check whether playback/capture property exists Kuninori Morimoto
2023-02-01  1:59 ` [PATCH 02/15] ASoC: rsnd: fixup #endif position Kuninori Morimoto
2023-02-01  1:59 ` [PATCH 03/15] ASoC: rsnd: Remove unnecessary rsnd_dbg_dai_call() Kuninori Morimoto
2023-02-01  2:00 ` Kuninori Morimoto [this message]
2023-02-01  2:00 ` [PATCH 05/15] ASoC: rsnd: indicate warning once if it can't handle requested rule Kuninori Morimoto
2023-02-01  2:00 ` [PATCH 06/15] ASoC: rsnd: use same debug message format on clkout Kuninori Morimoto
2023-02-01  2:00 ` [PATCH 07/15] ASoC: rsnd: remove unnecessary ADG flags Kuninori Morimoto
2023-02-01  2:00 ` [PATCH 08/15] ASoC: rsnd: rename clk to clkin Kuninori Morimoto
2023-02-01  2:00 ` [PATCH 09/15] ASoC: rsnd: moves clkout_name to top of the file Kuninori Morimoto
2023-02-01  2:00 ` [PATCH 10/15] ASoC: rsnd: use clkin/out_size Kuninori Morimoto
2023-02-01  2:00 ` [PATCH 11/15] ASoC: rsnd: use array for 44.1kHz/48kHz rate handling Kuninori Morimoto
2023-02-01  2:00 ` [PATCH 12/15] ASoC: rsnd: tidyup rsnd_dma_addr() Kuninori Morimoto
2023-02-01  2:00 ` [PATCH 13/15] ASoC: rsnd: dma.c: tidyup rsnd_dma_probe() Kuninori Morimoto
2023-02-01  2:02 ` [PATCH 14/15] ASoC: dt-bindings: renesas: add R8A779G0 V4H Kuninori Morimoto
2023-02-01  2:02   ` Kuninori Morimoto
2023-02-01  7:11   ` Krzysztof Kozlowski
2023-02-01  7:11     ` Krzysztof Kozlowski
2023-02-01 10:19     ` Mark Brown
2023-02-01 10:19       ` Mark Brown
2023-02-02  8:53   ` Geert Uytterhoeven
2023-02-02  8:53     ` Geert Uytterhoeven
2023-02-03  1:18     ` Kuninori Morimoto
2023-02-03  1:18       ` Kuninori Morimoto
2023-02-01  2:02 ` [PATCH 15/15] ASoC: rsnd: add R-Car Gen4 Sound support Kuninori Morimoto
2023-02-01 15:23 ` [PATCH 00/15] ASoC: rsnd: cleanup " Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874js66t7g.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.