Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH v2 1/6] ASoC: SDCA: propagate sdw_slave_read_prop() failure in class_read_prop
       [not found] <20261020073856.1177749-1-srinivas.kandagatla@oss.qualcomm.com>
@ 2026-10-20  7:38 ` Srinivas Kandagatla
  2026-10-20  7:38 ` [PATCH v2 2/6] ASoC: SDCA: drop pm_runtime reference on probe failure path Srinivas Kandagatla
  2026-10-20  7:38 ` [PATCH v2 3/6] ASoC: SDCA: re-enable IRQ on pm_runtime_force_suspend failure Srinivas Kandagatla
  2 siblings, 0 replies; 4+ messages in thread
From: Srinivas Kandagatla @ 2026-10-20  7:38 UTC (permalink / raw)
  To: Mark Brown, Charles Keepax, Vinod Koul
  Cc: Bard Liao, Jaroslav Kysela, Liam Girdwood, Maciej Strozek,
	Pierre-Louis Bossart, Sanyog Kale, Takashi Iwai, patches,
	linux-sound, alsa-devel, linux-kernel, Srinivas Kandagatla,
	stable

sdw_slave_read_prop() can fail with -ENOMEM; propagate the return
instead of leaving slave->prop partially initialised.

Fixes: 2d877d0659cb ("ASoC: SDCA: Add basic SDCA class driver")
Cc: stable@vger.kernel.org
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Assisted-by: LLM
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
---
 sound/soc/sdca/sdca_class.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sdca/sdca_class.c b/sound/soc/sdca/sdca_class.c
index 79fdb672be1d..bcc660aeb739 100644
--- a/sound/soc/sdca/sdca_class.c
+++ b/sound/soc/sdca/sdca_class.c
@@ -27,8 +27,11 @@
 static int class_read_prop(struct sdw_slave *sdw)
 {
 	struct sdw_slave_prop *prop = &sdw->prop;
+	int ret;
 
-	sdw_slave_read_prop(sdw);
+	ret = sdw_slave_read_prop(sdw);
+	if (ret)
+		return ret;
 
 	prop->use_domain_irq = true;
 	prop->scp_int1_mask = SDW_SCP_INT1_BUS_CLASH | SDW_SCP_INT1_PARITY |
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 2/6] ASoC: SDCA: drop pm_runtime reference on probe failure path
       [not found] <20261020073856.1177749-1-srinivas.kandagatla@oss.qualcomm.com>
  2026-10-20  7:38 ` [PATCH v2 1/6] ASoC: SDCA: propagate sdw_slave_read_prop() failure in class_read_prop Srinivas Kandagatla
@ 2026-10-20  7:38 ` Srinivas Kandagatla
  2026-10-20 10:05   ` Charles Keepax
  2026-10-20  7:38 ` [PATCH v2 3/6] ASoC: SDCA: re-enable IRQ on pm_runtime_force_suspend failure Srinivas Kandagatla
  2 siblings, 1 reply; 4+ messages in thread
From: Srinivas Kandagatla @ 2026-10-20  7:38 UTC (permalink / raw)
  To: Mark Brown, Charles Keepax, Vinod Koul
  Cc: Bard Liao, Jaroslav Kysela, Liam Girdwood, Maciej Strozek,
	Pierre-Louis Bossart, Sanyog Kale, Takashi Iwai, patches,
	linux-sound, alsa-devel, linux-kernel, Srinivas Kandagatla,
	stable

sdca_class_probe() takes an extra usage count with
pm_runtime_get_noresume() to keep the device powered on until the
deferred boot work has run. If devm_pm_runtime_enable() then fails,
that reference is never dropped.

Drop it on the error path.

Fixes: 2d877d0659cb ("ASoC: SDCA: Add basic SDCA class driver")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
---
 sound/soc/sdca/sdca_class.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sdca/sdca_class.c b/sound/soc/sdca/sdca_class.c
index bcc660aeb739..ca311209c6d1 100644
--- a/sound/soc/sdca/sdca_class.c
+++ b/sound/soc/sdca/sdca_class.c
@@ -197,8 +197,10 @@ int sdca_class_probe(struct sdw_slave *sdw,
 	pm_runtime_get_noresume(dev);
 
 	ret = devm_pm_runtime_enable(dev);
-	if (ret)
+	if (ret) {
+		pm_runtime_put_sync(dev);
 		return ret;
+	}
 
 	queue_work(system_long_wq, &drv->boot_work);
 
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 3/6] ASoC: SDCA: re-enable IRQ on pm_runtime_force_suspend failure
       [not found] <20261020073856.1177749-1-srinivas.kandagatla@oss.qualcomm.com>
  2026-10-20  7:38 ` [PATCH v2 1/6] ASoC: SDCA: propagate sdw_slave_read_prop() failure in class_read_prop Srinivas Kandagatla
  2026-10-20  7:38 ` [PATCH v2 2/6] ASoC: SDCA: drop pm_runtime reference on probe failure path Srinivas Kandagatla
@ 2026-10-20  7:38 ` Srinivas Kandagatla
  2 siblings, 0 replies; 4+ messages in thread
From: Srinivas Kandagatla @ 2026-10-20  7:38 UTC (permalink / raw)
  To: Mark Brown, Charles Keepax, Vinod Koul
  Cc: Bard Liao, Jaroslav Kysela, Liam Girdwood, Maciej Strozek,
	Pierre-Louis Bossart, Sanyog Kale, Takashi Iwai, patches,
	linux-sound, alsa-devel, linux-kernel, Srinivas Kandagatla,
	stable

The SoundWire IRQ was disabled before pm_runtime_force_suspend() but
never re-enabled when the force suspend failed, leaving the codec
unable to receive interrupts.

Fixes: 2d877d0659cb ("ASoC: SDCA: Add basic SDCA class driver")
Cc: stable@vger.kernel.org
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Assisted-by: LLM
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
---
 sound/soc/sdca/sdca_class.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/sdca/sdca_class.c b/sound/soc/sdca/sdca_class.c
index ca311209c6d1..ee61c983dc57 100644
--- a/sound/soc/sdca/sdca_class.c
+++ b/sound/soc/sdca/sdca_class.c
@@ -265,6 +265,7 @@ int sdca_class_system_suspend(struct sdca_class_drv *drv)
 	ret = pm_runtime_force_suspend(drv->dev);
 	if (ret) {
 		dev_err(drv->dev, "failed to force suspend: %d\n", ret);
+		enable_irq(drv->sdw->irq);
 		return ret;
 	}
 
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 2/6] ASoC: SDCA: drop pm_runtime reference on probe failure path
  2026-10-20  7:38 ` [PATCH v2 2/6] ASoC: SDCA: drop pm_runtime reference on probe failure path Srinivas Kandagatla
@ 2026-10-20 10:05   ` Charles Keepax
  0 siblings, 0 replies; 4+ messages in thread
From: Charles Keepax @ 2026-10-20 10:05 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Mark Brown, Vinod Koul, Bard Liao, Jaroslav Kysela, Liam Girdwood,
	Maciej Strozek, Pierre-Louis Bossart, Sanyog Kale, Takashi Iwai,
	patches, linux-sound, alsa-devel, linux-kernel, stable

On Tue, Oct 20, 2026 at 08:38:52AM +0100, Srinivas Kandagatla wrote:
> sdca_class_probe() takes an extra usage count with
> pm_runtime_get_noresume() to keep the device powered on until the
> deferred boot work has run. If devm_pm_runtime_enable() then fails,
> that reference is never dropped.
> 
> Drop it on the error path.
> 
> Fixes: 2d877d0659cb ("ASoC: SDCA: Add basic SDCA class driver")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
> ---

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-20 10:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20261020073856.1177749-1-srinivas.kandagatla@oss.qualcomm.com>
2026-10-20  7:38 ` [PATCH v2 1/6] ASoC: SDCA: propagate sdw_slave_read_prop() failure in class_read_prop Srinivas Kandagatla
2026-10-20  7:38 ` [PATCH v2 2/6] ASoC: SDCA: drop pm_runtime reference on probe failure path Srinivas Kandagatla
2026-10-20 10:05   ` Charles Keepax
2026-10-20  7:38 ` [PATCH v2 3/6] ASoC: SDCA: re-enable IRQ on pm_runtime_force_suspend failure Srinivas Kandagatla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox