mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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:
parent
6bba4e5a17
commit
b7c58a55fd
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user