linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: mxs-saif: Handle errors for clk_enable
@ 2022-03-01  8:17 Jiasheng Jiang
  2022-03-02 17:00 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Jiasheng Jiang @ 2022-03-01  8:17 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, shawnguo, s.hauer, kernel,
	festevam, linux-imx, Julia.Lawall
  Cc: alsa-devel, linux-arm-kernel, linux-kernel, Jiasheng Jiang

As the potential failure of the clk_enable(),
it should be better to check it, like mxs_saif_trigger().

Fixes: d0ba4c014934 ("ASoC: mxs-saif: set a base clock rate for EXTMASTER mode work")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
---
 sound/soc/mxs/mxs-saif.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index 6a2d24d48964..879c1221a809 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -455,7 +455,10 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream,
 		* basic clock which should be fast enough for the internal
 		* logic.
 		*/
-		clk_enable(saif->clk);
+		ret = clk_enable(saif->clk);
+		if (ret)
+			return ret;
+
 		ret = clk_set_rate(saif->clk, 24000000);
 		clk_disable(saif->clk);
 		if (ret)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: mxs-saif: Handle errors for clk_enable
  2022-03-01  8:17 [PATCH] ASoC: mxs-saif: Handle errors for clk_enable Jiasheng Jiang
@ 2022-03-02 17:00 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-03-02 17:00 UTC (permalink / raw)
  To: linux-imx, lgirdwood, tiwai, perex, shawnguo, kernel, s.hauer,
	Jiasheng Jiang, festevam, Julia.Lawall
  Cc: linux-kernel, alsa-devel, linux-arm-kernel

On Tue, 1 Mar 2022 16:17:17 +0800, Jiasheng Jiang wrote:
> As the potential failure of the clk_enable(),
> it should be better to check it, like mxs_saif_trigger().
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: mxs-saif: Handle errors for clk_enable
      commit: 2ecf362d220317debf5da376e0390e9f7a3f7b29

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-02 17:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-01  8:17 [PATCH] ASoC: mxs-saif: Handle errors for clk_enable Jiasheng Jiang
2022-03-02 17:00 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).