mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
ASoC: Intel: catpt: Fix error path in hw_params()
[ Upstream commit 86a5b621be658fc8fe594ca6db317d64de30cce1 ]
Do not leave any resources hanging on the DSP side if
applying user settings fails.
Fixes: 768a3a3b32 ("ASoC: Intel: catpt: Optimize applying user settings")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20251126095523.3925364-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
84b3ea5ba8
commit
886c8f5af8
@@ -417,8 +417,10 @@ static int catpt_dai_hw_params(struct snd_pcm_substream *substream,
|
||||
return CATPT_IPC_ERROR(ret);
|
||||
|
||||
ret = catpt_dai_apply_usettings(dai, stream);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
catpt_ipc_free_stream(cdev, stream->info.stream_hw_id);
|
||||
return ret;
|
||||
}
|
||||
|
||||
stream->allocated = true;
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user