linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: rk817: Use devm_clk_get() in rk817_platform_probe
@ 2022-04-04  9:07 Miaoqian Lin
  2022-04-06 13:28 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Miaoqian Lin @ 2022-04-04  9:07 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Miaoqian Lin, Chris Morgan, Lee Jones, Nicolas Frattaroli,
	Jiapeng Chong, Wei Yongjun, Colin Ian King, alsa-devel,
	linux-kernel

We need to call clk_put() to undo clk_get() in the error path.
Use devm_clk_get() to obtain a reference to the clock, It has
the benefit that clk_put() is no longer required.

Fixes: 0d6a04da9b25 ("ASoC: Add Rockchip rk817 audio CODEC support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
 sound/soc/codecs/rk817_codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rk817_codec.c b/sound/soc/codecs/rk817_codec.c
index 8fffe378618d..cce6f4e7992f 100644
--- a/sound/soc/codecs/rk817_codec.c
+++ b/sound/soc/codecs/rk817_codec.c
@@ -489,7 +489,7 @@ static int rk817_platform_probe(struct platform_device *pdev)
 
 	rk817_codec_parse_dt_property(&pdev->dev, rk817_codec_data);
 
-	rk817_codec_data->mclk = clk_get(pdev->dev.parent, "mclk");
+	rk817_codec_data->mclk = devm_clk_get(pdev->dev.parent, "mclk");
 	if (IS_ERR(rk817_codec_data->mclk)) {
 		dev_dbg(&pdev->dev, "Unable to get mclk\n");
 		ret = -ENXIO;
-- 
2.17.1


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

* Re: [PATCH] ASoC: rk817: Use devm_clk_get() in rk817_platform_probe
  2022-04-04  9:07 [PATCH] ASoC: rk817: Use devm_clk_get() in rk817_platform_probe Miaoqian Lin
@ 2022-04-06 13:28 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-04-06 13:28 UTC (permalink / raw)
  To: linux-kernel, colin.king, tiwai, weiyongjun1, jiapeng.chong,
	linmq006, frattaroli.nicolas, alsa-devel, lgirdwood, perex,
	lee.jones, macromorgan

On Mon, 4 Apr 2022 09:07:46 +0000, Miaoqian Lin wrote:
> We need to call clk_put() to undo clk_get() in the error path.
> Use devm_clk_get() to obtain a reference to the clock, It has
> the benefit that clk_put() is no longer required.
> 
> 

Applied to

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

Thanks!

[1/1] ASoC: rk817: Use devm_clk_get() in rk817_platform_probe
      commit: 8ba08d3a367a70f707b7c5d53ad92b98b960ee88

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-04-06 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04  9:07 [PATCH] ASoC: rk817: Use devm_clk_get() in rk817_platform_probe Miaoqian Lin
2022-04-06 13:28 ` 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).