diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2020-05-28 11:21:30 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-05-28 11:21:30 +0100 |
commit | aacc7c8be2900f1f0a2a1bd241c5eeb58878bb28 (patch) | |
tree | 57e8078cdf00f69f1940a2663ede9a95136b20f9 /hw/mips | |
parent | 8b92b9ef86077f9ec77998666cd7de137c33e9bf (diff) | |
parent | 49e2fa85ff04a9be89ed15f922c7d8dae2be9e74 (diff) |
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2020-05-27' into staging
Error reporting patches for 2020-05-27
# gpg: Signature made Wed 27 May 2020 06:48:02 BST
# gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-error-2020-05-27:
i386: Fix x86_cpu_load_model() error API violation
arm/sabrelite: Consistently use &error_fatal in sabrelite_init()
mips/boston: Plug memory leak in boston_mach_init()
mips/boston: Fix boston_mach_init() error handling
mips/malta: Fix create_cps() error handling
error: Use error_reportf_err() where appropriate
tests/migration: Tighten error checking
s390x/cpumodel: Fix harmless misuse of visit_check_struct()
xen: Fix and improve handling of device_add usb-host errors
nvdimm: Plug memory leak in uuid property setter
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/mips')
-rw-r--r-- | hw/mips/boston.c | 17 | ||||
-rw-r--r-- | hw/mips/malta.c | 15 |
2 files changed, 13 insertions, 19 deletions
diff --git a/hw/mips/boston.c b/hw/mips/boston.c index 98ecd25e8e..a896056be1 100644 --- a/hw/mips/boston.c +++ b/hw/mips/boston.c @@ -426,7 +426,6 @@ static void boston_mach_init(MachineState *machine) { DeviceState *dev; BostonState *s; - Error *err = NULL; MemoryRegion *flash, *ddr_low_alias, *lcd, *platreg; MemoryRegion *sys_mem = get_system_memory(); XilinxPCIEHost *pcie2; @@ -458,19 +457,17 @@ static void boston_mach_init(MachineState *machine) sysbus_init_child_obj(OBJECT(machine), "cps", OBJECT(&s->cps), sizeof(s->cps), TYPE_MIPS_CPS); object_property_set_str(OBJECT(&s->cps), machine->cpu_type, "cpu-type", - &err); - object_property_set_int(OBJECT(&s->cps), machine->smp.cpus, "num-vp", &err); - object_property_set_bool(OBJECT(&s->cps), true, "realized", &err); - - if (err != NULL) { - error_report("%s", error_get_pretty(err)); - exit(1); - } + &error_fatal); + object_property_set_int(OBJECT(&s->cps), machine->smp.cpus, "num-vp", + &error_fatal); + object_property_set_bool(OBJECT(&s->cps), true, "realized", + &error_fatal); sysbus_mmio_map_overlap(SYS_BUS_DEVICE(&s->cps), 0, 0, 1); flash = g_new(MemoryRegion, 1); - memory_region_init_rom(flash, NULL, "boston.flash", 128 * MiB, &err); + memory_region_init_rom(flash, NULL, "boston.flash", 128 * MiB, + &error_fatal); memory_region_add_subregion_overlap(sys_mem, 0x18000000, flash, 0); memory_region_add_subregion_overlap(sys_mem, 0x80000000, machine->ram, 0); diff --git a/hw/mips/malta.c b/hw/mips/malta.c index b673a3a248..636c95d1fe 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -1183,17 +1183,14 @@ static void create_cpu_without_cps(MachineState *ms, static void create_cps(MachineState *ms, MaltaState *s, qemu_irq *cbus_irq, qemu_irq *i8259_irq) { - Error *err = NULL; - sysbus_init_child_obj(OBJECT(s), "cps", OBJECT(&s->cps), sizeof(s->cps), TYPE_MIPS_CPS); - object_property_set_str(OBJECT(&s->cps), ms->cpu_type, "cpu-type", &err); - object_property_set_int(OBJECT(&s->cps), ms->smp.cpus, "num-vp", &err); - object_property_set_bool(OBJECT(&s->cps), true, "realized", &err); - if (err != NULL) { - error_report("%s", error_get_pretty(err)); - exit(1); - } + object_property_set_str(OBJECT(&s->cps), ms->cpu_type, "cpu-type", + &error_fatal); + object_property_set_int(OBJECT(&s->cps), ms->smp.cpus, "num-vp", + &error_fatal); + object_property_set_bool(OBJECT(&s->cps), true, "realized", + &error_fatal); sysbus_mmio_map_overlap(SYS_BUS_DEVICE(&s->cps), 0, 0, 1); |