From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Cc: codrin.ciubotariu@microchip.com, lgirdwood@gmail.com,
broonie@kernel.org, perex@perex.cz, tiwai@suse.com,
nicolas.ferre@microchip.com, claudiu.beznea@microchip.com,
alsa-devel@alsa-project.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: atmel_ssc_dai: Handle errors for clk_enable
Date: Tue, 1 Mar 2022 12:18:32 +0100 [thread overview]
Message-ID: <Yh4BCPqPngcsvER1@piout.net> (raw)
In-Reply-To: <20220301090637.3776558-1-jiasheng@iscas.ac.cn>
On 01/03/2022 17:06:37+0800, Jiasheng Jiang wrote:
> As the potential failure of the clk_enable(),
> it should be better to check it and return error if fals.
>
As I already replied to an earlier patch, this will never, ever fail,
this patch doesn't fix anything.
> Fixes: cbaadf0f90d6 ("ASoC: atmel_ssc_dai: refactor the startup and shutdown")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
> ---
> sound/soc/atmel/atmel_ssc_dai.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
> index 26e2bc690d86..c1dea8d62416 100644
> --- a/sound/soc/atmel/atmel_ssc_dai.c
> +++ b/sound/soc/atmel/atmel_ssc_dai.c
> @@ -280,7 +280,10 @@ static int atmel_ssc_startup(struct snd_pcm_substream *substream,
>
> /* Enable PMC peripheral clock for this SSC */
> pr_debug("atmel_ssc_dai: Starting clock\n");
> - clk_enable(ssc_p->ssc->clk);
> + ret = clk_enable(ssc_p->ssc->clk);
> + if (ret)
> + return ret;
> +
> ssc_p->mck_rate = clk_get_rate(ssc_p->ssc->clk);
>
> /* Reset the SSC unless initialized to keep it in a clean state */
> --
> 2.25.1
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2022-03-01 11:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-01 9:06 [PATCH] ASoC: atmel_ssc_dai: Handle errors for clk_enable Jiasheng Jiang
2022-03-01 11:18 ` Alexandre Belloni [this message]
2022-03-01 12:46 ` Mark Brown
2022-03-02 17:00 ` 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=Yh4BCPqPngcsvER1@piout.net \
--to=alexandre.belloni@bootlin.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=claudiu.beznea@microchip.com \
--cc=codrin.ciubotariu@microchip.com \
--cc=jiasheng@iscas.ac.cn \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox