aboutsummaryrefslogtreecommitdiffstats
path: root/hw/dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/dma.c')
-rw-r--r--hw/dma.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/hw/dma.c b/hw/dma.c
index c8ed6b0..ff1aa2e 100644
--- a/hw/dma.c
+++ b/hw/dma.c
@@ -345,9 +345,11 @@ static void channel_run (int ncont, int ichan)
#endif
r = dma_controllers[ncont].regs + ichan;
- n = r->transfer_handler (r->opaque, ichan + (ncont << 2),
- r->now[COUNT], (r->base[COUNT] + 1) << ncont);
- r->now[COUNT] = n;
+ if (r->transfer_handler) {
+ n = r->transfer_handler (r->opaque, ichan + (ncont << 2),
+ r->now[COUNT], (r->base[COUNT] + 1) << ncont);
+ r->now[COUNT] = n;
+ }
ldebug ("dma_pos %d size %d\n", n, (r->base[COUNT] + 1) << ncont);
}