]> Git Repo - qemu.git/blobdiff - hw/ppc/ppc440_uc.c
hw/ppc/ppc440_uc: Remove dead code in sdram_size()
[qemu.git] / hw / ppc / ppc440_uc.c
index 0bbaa6844a4082bb15daac59a02ca3e046e82d8e..9360f781cefd8d70c9cd750764b0c8fdb8b7bf84 100644 (file)
@@ -559,11 +559,7 @@ static target_ulong sdram_size(uint32_t bcr)
     int sh;
 
     sh = 1024 - ((bcr >> 6) & 0x3ff);
-    if (sh == 0) {
-        size = -1;
-    } else {
-        size = 8 * MiB * sh;
-    }
+    size = 8 * MiB * sh;
 
     return size;
 }
@@ -935,7 +931,7 @@ static void dcr_write_dma(void *opaque, int dcrn, uint32_t val)
                     if (wptr) {
                         cpu_physical_memory_unmap(wptr, wlen, 1, didx);
                     }
-                    if (wptr) {
+                    if (rptr) {
                         cpu_physical_memory_unmap(rptr, rlen, 0, sidx);
                     }
                 }
This page took 0.022283 seconds and 4 git commands to generate.