Skip to content
Snippets Groups Projects
Commit 116ee356 authored by Sivacharan Paka's avatar Sivacharan Paka Committed by Ariel Yin
Browse files

ASoC: msm: qdspv2: add result check when audio process fail


A audio_process_event_req is not always to success. Therefore,
check the return value for audio_process_event_req, and
initializ usr_evt before using it.

Bug: 35764875
CRs-Fixed: 2029798
Change-Id: I4adf682575f5f9233a1a1a533f9c6361af8a5bcf
Signed-off-by: default avatarkunleiz <kunleiz@codeaurora.org>
parent 333719a8
No related branches found
No related tags found
No related merge requests found
...@@ -841,6 +841,7 @@ static long audio_aio_process_event_req_compat(struct q6audio_aio *audio, ...@@ -841,6 +841,7 @@ static long audio_aio_process_event_req_compat(struct q6audio_aio *audio,
long rc; long rc;
struct msm_audio_event32 usr_evt_32; struct msm_audio_event32 usr_evt_32;
struct msm_audio_event usr_evt; struct msm_audio_event usr_evt;
memset(&usr_evt, 0, sizeof(struct msm_audio_event));
if (copy_from_user(&usr_evt_32, arg, if (copy_from_user(&usr_evt_32, arg,
sizeof(struct msm_audio_event32))) { sizeof(struct msm_audio_event32))) {
...@@ -850,6 +851,11 @@ static long audio_aio_process_event_req_compat(struct q6audio_aio *audio, ...@@ -850,6 +851,11 @@ static long audio_aio_process_event_req_compat(struct q6audio_aio *audio,
usr_evt.timeout_ms = usr_evt_32.timeout_ms; usr_evt.timeout_ms = usr_evt_32.timeout_ms;
rc = audio_aio_process_event_req_common(audio, &usr_evt); rc = audio_aio_process_event_req_common(audio, &usr_evt);
if (rc < 0) {
pr_err("%s: audio process event failed, rc = %ld",
__func__, rc);
return rc;
}
usr_evt_32.event_type = usr_evt.event_type; usr_evt_32.event_type = usr_evt.event_type;
switch (usr_evt_32.event_type) { switch (usr_evt_32.event_type) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment