bcm2835_audio_callback: Don't process garbage if there is no message.
If vchi_msg_dequeue failed due to an empty queue, return rather than treating stack garbage as a valid message.
This commit is contained in:
@@ -207,6 +207,8 @@ bcm2835_audio_callback(void *param, const VCHI_CALLBACK_REASON_T reason, void *m
|
||||
|
||||
status = vchi_msg_dequeue(sc->vchi_handle,
|
||||
&m, sizeof m, &msg_len, VCHI_FLAGS_NONE);
|
||||
if (status != 0)
|
||||
return;
|
||||
if (m.type == VC_AUDIO_MSG_TYPE_RESULT) {
|
||||
if (m.u.result.success) {
|
||||
device_printf(sc->dev,
|
||||
|
||||
Reference in New Issue
Block a user