diff mbox series

[1/2] ASoC: cs42l43: Handle error from devm_pm_runtime_enable

Message ID 20240206113850.719888-1-ckeepax@opensource.cirrus.com
State Accepted
Commit d1722057477a3786b8c0d60c28fc281f6ecf1cc3
Headers show
Series [1/2] ASoC: cs42l43: Handle error from devm_pm_runtime_enable | expand

Commit Message

Charles Keepax Feb. 6, 2024, 11:38 a.m. UTC
As devm_pm_runtime_enable can fail due to memory allocations, it is
best to handle the error.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 sound/soc/codecs/cs42l43.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Mark Brown Feb. 7, 2024, 3:23 p.m. UTC | #1
On Tue, 06 Feb 2024 11:38:49 +0000, Charles Keepax wrote:
> As devm_pm_runtime_enable can fail due to memory allocations, it is
> best to handle the error.
> 
> 

Applied to

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

Thanks!

[1/2] ASoC: cs42l43: Handle error from devm_pm_runtime_enable
      commit: d1722057477a3786b8c0d60c28fc281f6ecf1cc3
[2/2] ASoC: cs42l43: Add system suspend ops to disable IRQ
      commit: 64353af49fecbdec1de9aadf2369d54fc00f1899

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 mbox series

Patch

diff --git a/sound/soc/codecs/cs42l43.c b/sound/soc/codecs/cs42l43.c
index 256767ef4c03..f1e119277622 100644
--- a/sound/soc/codecs/cs42l43.c
+++ b/sound/soc/codecs/cs42l43.c
@@ -2283,7 +2283,10 @@  static int cs42l43_codec_probe(struct platform_device *pdev)
 	pm_runtime_use_autosuspend(priv->dev);
 	pm_runtime_set_active(priv->dev);
 	pm_runtime_get_noresume(priv->dev);
-	devm_pm_runtime_enable(priv->dev);
+
+	ret = devm_pm_runtime_enable(priv->dev);
+	if (ret)
+		goto err_pm;
 
 	for (i = 0; i < ARRAY_SIZE(cs42l43_irqs); i++) {
 		ret = cs42l43_request_irq(priv, dom, cs42l43_irqs[i].name,