Merge "dsp: q6voice: Handle mutex lock-unlock"

This commit is contained in:
qctecmdr 2023-11-09 04:49:18 -08:00 • committed by Gerrit - the friendly Code Review server
commit ba72ce6dab

View file

@ -6898,6 +6898,7 @@ int voc_set_device_config(uint32_t session_id, uint8_t path_dir,
struct media_format_info *finfo)
{
struct voice_data *v = voice_get_session(session_id);
int ret = 0;
if (v == NULL) {
pr_err("%s: Invalid session_id 0x%x\n", __func__, session_id);
@ -6929,12 +6930,12 @@ int voc_set_device_config(uint32_t session_id, uint8_t path_dir,
break;
default:
pr_err("%s: Invalid path_dir %d\n", __func__, path_dir);
return -EINVAL;
ret = -EINVAL;
}
mutex_unlock(&v->lock);
return 0;
return ret;
}
EXPORT_SYMBOL(voc_set_device_config);