Skip to content
Unverified Commit ed67a340 authored by Harshit Mogalapalli's avatar Harshit Mogalapalli Committed by Mark Brown
Browse files

ASoC: SOF: Intel: hda-dai: Fix locking in hda_ipc4_pre_trigger()



hda_ipc4_pre_trigger() has two issues:
 1. In the default case, we are returning without unlocking the mutex.
 2. In case SNDRV_PCM_TRIGGER_STOP: when ret is less than zero it goes
    to out, unlocks but returns zero instead of a negative value.

Fix this by changing the final return value to 'ret' instead of zero,
and initialize 'ret' to zero in the start of the function.

Fixes: 225f37b5 ("ASoC: SOF: ipc4-pcm: reset all pipelines during FE DAI hw_free")
Signed-off-by: default avatarHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20230519064404.1659637-1-harshit.m.mogalapalli@oracle.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent fcbc3aac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment