aboutsummaryrefslogtreecommitdiff
path: root/hw/sun4m.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/sun4m.c')
-rw-r--r--hw/sun4m.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/sun4m.c b/hw/sun4m.c
index 4954ba37da..c810b35984 100644
--- a/hw/sun4m.c
+++ b/hw/sun4m.c
@@ -510,11 +510,11 @@ static void ram_init(target_phys_addr_t addr, ram_addr_t RAM_size,
exit(1);
}
dev = qdev_create(NULL, "memory");
- qdev_init(dev);
s = sysbus_from_qdev(dev);
d = FROM_SYSBUS(RamDevice, s);
d->size = RAM_size;
+ qdev_init(dev);
sysbus_mmio_map(s, 0, addr);
}