ppc440_uc: Fix a copy/paste error
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Wed, 4 Jul 2018 14:44:00 +0000 (11:44 -0300)
committerDavid Gibson <david@gibson.dropbear.id.au>
Sat, 7 Jul 2018 02:12:27 +0000 (12:12 +1000)
Missed in 3c409c1927e, hopefully reported by Coverity.

Fixes: Coverity CID 1393788 (Copy-paste error)
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/ppc440_uc.c

index 0bbaa6844a4082bb15daac59a02ca3e046e82d8e..09ccda548f36c180a2d40d84909fce4edf197963 100644 (file)
@@ -935,7 +935,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);
                     }
                 }