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. CRs-Fixed: 2029798 Bug: 35764875 Change-Id: I4adf682575f5f9233a1a1a533f9c6361af8a5bcf Signed-off-by: kunleiz <kunleiz@codeaurora.org>
This commit is contained in:
parent
929cc48d38
commit
f9248c36a0
|
@ -592,7 +592,7 @@ static long audio_aio_process_event_req(struct q6audio_aio *audio,
|
|||
struct audio_aio_event *drv_evt = NULL;
|
||||
int timeout;
|
||||
unsigned long flags;
|
||||
|
||||
memset(&usr_evt, 0, sizeof(struct msm_audio_event));
|
||||
if (copy_from_user(&usr_evt, arg, sizeof(struct msm_audio_event)))
|
||||
return -EFAULT;
|
||||
|
||||
|
@ -610,8 +610,12 @@ static long audio_aio_process_event_req(struct q6audio_aio *audio,
|
|||
rc = wait_event_interruptible(audio->event_wait,
|
||||
audio_aio_events_pending(audio));
|
||||
}
|
||||
if (rc < 0)
|
||||
|
||||
if (rc < 0) {
|
||||
pr_err("%s: audio process event failed, rc = %ld",
|
||||
__func__, rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (audio->event_abort) {
|
||||
audio->event_abort = 0;
|
||||
|
|
Loading…
Reference in New Issue