summary refs log tree commit diff stats
path: root/hw/dma.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-04-12 19:07:27 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-04-12 19:07:27 +0000
commitdf475d18d890572b8456ebff327bb9debee6289a (patch)
tree768cee522f8d1a42c8c0052d26f468872f0ba808 /hw/dma.c
parent2f0c934ef9cc6f9bbce0326cdd7fe2f993288705 (diff)
downloadfocaccia-qemu-df475d18d890572b8456ebff327bb9debee6289a.tar.gz
focaccia-qemu-df475d18d890572b8456ebff327bb9debee6289a.zip
fixed invalid command test
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@721 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/dma.c')
-rw-r--r--hw/dma.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/hw/dma.c b/hw/dma.c
index 24e90c4e6d..bac6d95dfb 100644
--- a/hw/dma.c
+++ b/hw/dma.c
@@ -168,9 +168,9 @@ static void write_cont (void *opaque, uint32_t nport, uint32_t data)
     iport = (nport >> d->dshift) & 0x0f;
     switch (iport) {
     case 8:                     /* command */
-        if (data && (data | CMD_NOT_SUPPORTED)) {
+        if ((data != 0) && (data & CMD_NOT_SUPPORTED)) {
             log ("command %#x not supported\n", data);
-            goto error;
+            return;
         }
         d->command = data;
         break;
@@ -236,7 +236,7 @@ static void write_cont (void *opaque, uint32_t nport, uint32_t data)
 
     default:
         log ("dma: unknown iport %#x\n", iport);
-        goto error;
+        break;
     }
 
 #ifdef DEBUG_DMA
@@ -245,10 +245,6 @@ static void write_cont (void *opaque, uint32_t nport, uint32_t data)
                nport, ichan, data);
     }
 #endif
-    return;
-
- error:
-    abort ();
 }
 
 static uint32_t read_cont (void *opaque, uint32_t nport)