]> Git Repo - qemu.git/commitdiff
xilinx_axidma: Do not set DMA .notify to NULL after notify
authorWendy Liang <[email protected]>
Fri, 7 Jun 2013 03:05:38 +0000 (13:05 +1000)
committerEdgar E. Iglesias <[email protected]>
Mon, 10 Jun 2013 11:04:40 +0000 (13:04 +0200)
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]>
hw/dma/xilinx_axidma.c

index 3a3ef8aff351595698f3ea2fe9dca0a5b07b587d..50054cf8517dec04fa552275f6187dd7a1753980 100644 (file)
@@ -514,8 +514,9 @@ static void axidma_write(void *opaque, hwaddr addr,
             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);
 }
This page took 0.026813 seconds and 4 git commands to generate.