mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-08 14:23:19 +00:00
staging: bcm2835-audio: Need to judge the return value of vchi_msg_dequeue in audio_vchi_callback
If vchi_msg_dequeue return -1, variable m is not assigined, need to return. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: zhengbin <zhengbin13@huawei.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1570520515-2186-2-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
17a29fea08
commit
5193dbdaf0
@ -103,6 +103,9 @@ static void audio_vchi_callback(void *param,
|
||||
|
||||
status = vchi_msg_dequeue(instance->vchi_handle,
|
||||
&m, sizeof(m), &msg_len, VCHI_FLAGS_NONE);
|
||||
if (status)
|
||||
return;
|
||||
|
||||
if (m.type == VC_AUDIO_MSG_TYPE_RESULT) {
|
||||
instance->result = m.result.success;
|
||||
complete(&instance->msg_avail_comp);
|
||||
|
Loading…
Reference in New Issue
Block a user