diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-22 01:57:42 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-22 01:57:42 +0000 |
commit | d406647966365b4ea505ef290825b257c678e764 (patch) | |
tree | 22a1ecd8690c3c1efc5f38df79e23d17a34d1fea /hw/soc_dma.c | |
parent | 8706c3824f5b8f3c68db5fa39122a44b4f161e35 (diff) |
Fix a bad comparison, spotted by Paul Brook.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4922 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/soc_dma.c')
-rw-r--r-- | hw/soc_dma.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/soc_dma.c b/hw/soc_dma.c index f46e260600..4ff8cae7c2 100644 --- a/hw/soc_dma.c +++ b/hw/soc_dma.c @@ -49,7 +49,7 @@ static void *fifo_buf; static int fifo_size; void transfer_fifo2fifo(struct soc_dma_ch_s *ch) { - if (ch->bytes < fifo_size) + if (ch->bytes > fifo_size) fifo_buf = realloc(fifo_buf, fifo_size = ch->bytes); /* Implement as transfer_fifo2linear + transfer_linear2fifo. */ @@ -251,6 +251,7 @@ struct soc_dma_s *soc_dma_init(int n) } soc_dma_reset(&s->soc); + fifo_size = 0; return &s->soc; } |