If a stream notify function is not ready, it may re-populate the notify call-
back to indicate it should be re-polled later. This break in this usage, as
immediately following the notify() call, .notify is set to NULL. reverse the
ordering of the notify call and NULL assignment accordingly.
[PC: Reworked commit message]
Signed-off-by: Wendy Liang <[email protected]>
Signed-off-by: Peter Crosthwaite <[email protected]>
Signed-off-by: Edgar E. Iglesias <[email protected]>
break;
}
if (sid == 1 && d->notify) {
- d->notify(d->notify_opaque);
+ StreamCanPushNotifyFn notifytmp = d->notify;
d->notify = NULL;
+ notifytmp(d->notify_opaque);
}
stream_update_irq(s);
}