ASoC: renesas: msiof: Fix msiof_close() being skipped on rollback

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: c61caec228 ("ASoC: renesas: add MSIOF sound support")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20261008103831.542533-22-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
bui duc phuc 2026-10-08 17:38:28 +07:00 committed by Mark Brown
parent 6bba4e5a17
commit b7c58a55fd
No known key found for this signature in database
GPG Key ID: 2FEF73B0B3D03889

View File

@ -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,