summary refs log tree commit diff stats
path: root/hw/pcmcia/pxa2xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/pcmcia/pxa2xx.c')
-rw-r--r--hw/pcmcia/pxa2xx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/pcmcia/pxa2xx.c b/hw/pcmcia/pxa2xx.c
index 8667244df4..5f4bf22a90 100644
--- a/hw/pcmcia/pxa2xx.c
+++ b/hw/pcmcia/pxa2xx.c
@@ -13,6 +13,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "qapi/error.h"
 #include "qemu/module.h"
 #include "hw/pcmcia.h"
 #include "hw/arm/pxa.h"
@@ -147,11 +148,11 @@ PXA2xxPCMCIAState *pxa2xx_pcmcia_init(MemoryRegion *sysmem,
     DeviceState *dev;
     PXA2xxPCMCIAState *s;
 
-    dev = qdev_create(NULL, TYPE_PXA2XX_PCMCIA);
+    dev = qdev_new(TYPE_PXA2XX_PCMCIA);
     sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base);
     s = PXA2XX_PCMCIA(dev);
 
-    qdev_init_nofail(dev);
+    sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
 
     return s;
 }