22 May
2023
22 May
'23
10:28 p.m.
On Thu, 2023-05-18 at 23:44 -0700, Harshit Mogalapalli wrote:
hda_ipc4_pre_trigger() has two issues:
- 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: 225f37b578a9 ("ASoC: SOF: ipc4-pcm: reset all pipelines during FE DAI hw_free") Signed-off-by: Harshit Mogalapalli harshit.m.mogalapalli@oracle.com
Only compile tested. This is found using static anlysis with Smatch.
Thanks for this fix. LGTM.
Reviewed-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com