Skip to content

Commit 86a5b62

Browse files
crojewsk-intelbroonie
authored andcommitted
ASoC: Intel: catpt: Fix error path in hw_params()
Do not leave any resources hanging on the DSP side if applying user settings fails. Fixes: 768a3a3 ("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>
1 parent ea38b26 commit 86a5b62

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • sound/soc/intel/catpt

sound/soc/intel/catpt/pcm.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,10 @@ static int catpt_dai_hw_params(struct snd_pcm_substream *substream,
417417
return CATPT_IPC_ERROR(ret);
418418

419419
ret = catpt_dai_apply_usettings(dai, stream);
420-
if (ret)
420+
if (ret) {
421+
catpt_ipc_free_stream(cdev, stream->info.stream_hw_id);
421422
return ret;
423+
}
422424

423425
stream->allocated = true;
424426
return 0;

0 commit comments

Comments
 (0)