[PATCH 21/24] ASoC: renesas: msiof: Fix msiof_close() being skipped on rollback
phucduc.bui at gmail.com
phucduc.bui at gmail.com
Thu Oct 8 03:38:28 PDT 2026
From: bui duc phuc <phucduc.bui at gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from msiof_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: c61caec22820 ("ASoC: renesas: add MSIOF sound support")
Signed-off-by: bui duc phuc <phucduc.bui at gmail.com>
---
sound/soc/renesas/rcar/msiof.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/renesas/rcar/msiof.c b/sound/soc/renesas/rcar/msiof.c
index 128543fc4fc9..9fead9a22cdc 100644
--- a/sound/soc/renesas/rcar/msiof.c
+++ b/sound/soc/renesas/rcar/msiof.c
@@ -427,10 +427,12 @@ static int msiof_open(struct snd_soc_component *component,
ret = snd_pcm_hw_constraint_integer(substream->runtime, SNDRV_PCM_HW_PARAM_PERIODS);
open_err_dma:
- if (ret < 0)
+ if (ret < 0) {
dma_release_channel(chan);
+ return ret;
+ }
- return ret;
+ return 0;
}
static int msiof_close(struct snd_soc_component *component,
--
2.43.0
More information about the Linux-rockchip
mailing list