qdev scsi bus infrastructure
[qemu] / hw / mpcore.c
index 914087a..f90f73a 100644 (file)
@@ -195,8 +195,7 @@ static uint32_t mpcore_priv_read(void *opaque, target_phys_addr_t offset)
         return mpcore_timer_read(&s->timer[id], offset & 0xf);
     }
 bad_reg:
-    cpu_abort(cpu_single_env, "mpcore_priv_read: Bad offset %x\n",
-              (int)offset);
+    hw_error("mpcore_priv_read: Bad offset %x\n", (int)offset);
     return 0;
 }
 
@@ -241,8 +240,7 @@ static void mpcore_priv_write(void *opaque, target_phys_addr_t offset,
     }
     return;
 bad_reg:
-    cpu_abort(cpu_single_env, "mpcore_priv_read: Bad offset %x\n",
-              (int)offset);
+    hw_error("mpcore_priv_read: Bad offset %x\n", (int)offset);
 }
 
 static CPUReadMemoryFunc *mpcore_priv_readfn[] = {
@@ -265,8 +263,6 @@ static qemu_irq *mpcore_priv_init(uint32_t base, qemu_irq *pic_irq)
     int i;
 
     s = (mpcore_priv_state *)qemu_mallocz(sizeof(mpcore_priv_state));
-    if (!s)
-        return NULL;
     s->gic = gic_init(base + 0x1000, pic_irq);
     if (!s->gic)
         return NULL;