ASoC: cs35l41: Verify PM runtime resume errors in IRQ handler
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Thu, 7 Sep 2023 17:10:04 +0000 (20:10 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:59:17 +0000 (11:59 +0100)
commit11372a1a13345765821ec2f90fadcde58e35403b
tree2ea65e746ece86a57c51e1bd413317396a564bbe
parent507032d6abc5ba93d5886406171ee8ea29ee3e6c
ASoC: cs35l41: Verify PM runtime resume errors in IRQ handler

[ Upstream commit 9f8948db9849d202dee3570507d3a0642f92d632 ]

The interrupt handler invokes pm_runtime_get_sync() without checking the
returned error code.

Add a proper verification and switch to pm_runtime_resume_and_get(), to
avoid the need to call pm_runtime_put_noidle() for decrementing the PM
usage counter before returning from the error condition.

Fixes: f517ba4924ad ("ASoC: cs35l41: Add support for hibernate memory retention mode")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20230907171010.1447274-6-cristian.ciocaltea@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/cs35l41.c