Skip to contentSkip to conversation

ASoC: rk3328: fix disabling mclk on pclk probe failure

PATCH In review Nicolas Frattaroli 3 participants 4 messages Apr 27, 2022 – Apr 29, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: rk3328: fix disabling mclk on pclk probe failure

If preparing/enabling the pclk fails, the probe function should unprepare and disable the previously prepared and enabled mclk, which it doesn't do. This commit rectifies this.

Fixes c32759035ad2 ("ASoC: rockchip: support ACODEC for rk3328")
---
 sound/soc/codecs/rk3328_codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/rk3328_codec.c +1 -1
index 758d439e8c7a..86b679cf7aef 100644
@@ -481,7 +481,7 @@ static int rk3328_platform_probe(struct platform_device *pdev)
 	ret = clk_prepare_enable(rk3328->pclk);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "failed to enable acodec pclk\n");
-		return ret;
+		goto err_unprepare_mclk;
 	}
 
 	base = devm_platform_ioremap_resource(pdev, 0);
Signature · 1 line
2.36.0
Reviewed-by on v1 1/1
#1 lore raw

Hello Nicolas,

Oh, indeed. Thanks for fix.

Quoted 15 lines · Nicolas Frattaroli

If preparing/enabling the pclk fails, the probe function should unprepare and disable the previously prepared and enabled mclk, which it doesn't do. This commit rectifies this.

Fixes c32759035ad2 ("ASoC: rockchip: support ACODEC for rk3328")
---
  sound/soc/codecs/rk3328_codec.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/rk3328_codec.c +0 -0
index 758d439e8c7a..86b679cf7aef 100644

sound/soc/codecs/rk3328_codec.c static int rk3328_platform_probe(struct platform_device *pdev) · line 487

Quoted 8 lines
sound/soc/codecs/rk3328_codec.c +1 -1
@@ -481,7 +481,7 @@ static int rk3328_platform_probe(struct platform_device *pdev)
  	ret = clk_prepare_enable(rk3328->pclk);
  	if (ret < 0) {
  		dev_err(&pdev->dev, "failed to enable acodec pclk\n");
-		return ret;
+		goto err_unprepare_mclk;
  	}
 
  	base = devm_platform_ioremap_resource(pdev, 0);

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

maintainer
#2 lore raw
In reply to Nicolas Frattaroli
Quoted 5 lines · Nicolas Frattaroli

If preparing/enabling the pclk fails, the probe function should unprepare and disable the previously prepared and enabled mclk, which it doesn't do. This commit rectifies this.

Applied to

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

Thanks!

[1/1] ASoC: rk3328: fix disabling mclk on pclk probe failure

      commit: dd508e324cdde1c06ace08a8143fa50333a90703

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

maintainer
#3 lore raw
In reply to Nicolas Frattaroli
Quoted 5 lines · Nicolas Frattaroli

If preparing/enabling the pclk fails, the probe function should unprepare and disable the previously prepared and enabled mclk, which it doesn't do. This commit rectifies this.

Applied to

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

Thanks!

[1/1] ASoC: rk3328: fix disabling mclk on pclk probe failure

      commit: dd508e324cdde1c06ace08a8143fa50333a90703

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

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip