diff --git a/dsp/q6voice.c b/dsp/q6voice.c index f5115d225655..769fb9ff41a3 100644 --- a/dsp/q6voice.c +++ b/dsp/q6voice.c @@ -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);