Message ID | 20220427172310.138638-1-frattaroli.nicolas@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ASoC: rk3328: fix disabling mclk on pclk probe failure | expand |
Hello Nicolas, Oh, indeed. Thanks for fix. Reviewed-by: Katsuhiro Suzuki <katsuhiro@katsuster.net> On 2022/04/28 2:23, Nicolas Frattaroli wrote: > 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") > Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com> > --- > sound/soc/codecs/rk3328_codec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/soc/codecs/rk3328_codec.c b/sound/soc/codecs/rk3328_codec.c > index 758d439e8c7a..86b679cf7aef 100644 > --- a/sound/soc/codecs/rk3328_codec.c > +++ b/sound/soc/codecs/rk3328_codec.c > @@ -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);
On Wed, 27 Apr 2022 19:23:11 +0200, Nicolas Frattaroli wrote: > 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
On Wed, 27 Apr 2022 19:23:11 +0200, Nicolas Frattaroli wrote: > 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
diff --git a/sound/soc/codecs/rk3328_codec.c b/sound/soc/codecs/rk3328_codec.c index 758d439e8c7a..86b679cf7aef 100644 --- a/sound/soc/codecs/rk3328_codec.c +++ b/sound/soc/codecs/rk3328_codec.c @@ -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);
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") Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com> --- sound/soc/codecs/rk3328_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)