[PATCH 18/24] ASoC: imx-pcm-rpmsg: Fix imx_rpmsg_pcm_close() being skipped on rollback
phucduc.bui at gmail.com
phucduc.bui at gmail.com
Thu Oct 8 03:38:25 PDT 2026
From: bui duc phuc <phucduc.bui at gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from imx_rpmsg_pcm_open(). ASoC only marks the component as opened
when .open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: 3c00eceb2a53 ("ASoC: imx-pcm-rpmsg: Add platform driver for audio base on rpmsg")
Signed-off-by: bui duc phuc <phucduc.bui at gmail.com>
---
sound/soc/fsl/imx-pcm-rpmsg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/fsl/imx-pcm-rpmsg.c b/sound/soc/fsl/imx-pcm-rpmsg.c
index 7086fb7fc1eb..30e75fee5175 100644
--- a/sound/soc/fsl/imx-pcm-rpmsg.c
+++ b/sound/soc/fsl/imx-pcm-rpmsg.c
@@ -269,7 +269,7 @@ static int imx_rpmsg_pcm_open(struct snd_soc_component *component,
info->stream_timer[substream->stream].substream = substream;
timer_setup(&info->stream_timer[substream->stream].timer,
imx_rpmsg_timer_callback, 0);
- return ret;
+ return 0;
}
static int imx_rpmsg_pcm_close(struct snd_soc_component *component,
--
2.43.0
More information about the Linux-rockchip
mailing list