From 7aeb1e5100c026f2f232e570cd4d56942785f462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 4 Jul 2018 11:44:00 -0300 Subject: [PATCH] ppc440_uc: Fix a copy/paste error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Missed in 3c409c1927e, hopefully reported by Coverity. Fixes: Coverity CID 1393788 (Copy-paste error) Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: BALATON Zoltan Signed-off-by: David Gibson --- hw/ppc/ppc440_uc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c index 0bbaa6844a..09ccda548f 100644 --- a/hw/ppc/ppc440_uc.c +++ b/hw/ppc/ppc440_uc.c @@ -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); } }