]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: cs35l56: Don't leave parent IRQ disabled if system_suspend fails
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Wed, 10 Jun 2026 10:55:56 +0000 (11:55 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 10 Jun 2026 11:04:36 +0000 (12:04 +0100)
In cs35l56_system_suspend() re-enable the parent IRQ if the call to
pm_runtime_force_suspend() returns an error.

Fixes: f9dc6b875ec0 ("ASoC: cs35l56: Add basic system suspend handling")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260610105556.612830-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs35l56.c

index 2e3b5f5e33baf6f8fb6001deacfbeda148ad957f..570a68829ccd0716b25b4b980978dde016ae7e3a 100644 (file)
@@ -1524,6 +1524,7 @@ static int __maybe_unused cs35l56_runtime_resume_i2c_spi(struct device *dev)
 int cs35l56_system_suspend(struct device *dev)
 {
        struct cs35l56_private *cs35l56 = dev_get_drvdata(dev);
+       int ret;
 
        dev_dbg(dev, "system_suspend\n");
 
@@ -1539,7 +1540,11 @@ int cs35l56_system_suspend(struct device *dev)
        if (cs35l56->base.irq)
                disable_irq(cs35l56->base.irq);
 
-       return pm_runtime_force_suspend(dev);
+       ret = pm_runtime_force_suspend(dev);
+       if ((ret < 0) && cs35l56->base.irq)
+               enable_irq(cs35l56->base.irq);
+
+       return ret;
 }
 EXPORT_SYMBOL_GPL(cs35l56_system_suspend);