From: Bernhard Beschow Date: Sun, 29 May 2022 18:40:04 +0000 (+0200) Subject: hw/i386/microvm-dt: Force explicit failure if retrieving QOM property fails X-Git-Tag: v7.1.0-rc0~65^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=94c720f39ede609ca659e9e351d634711656dbb4;p=thirdparty%2Fqemu.git hw/i386/microvm-dt: Force explicit failure if retrieving QOM property fails New code will be added where this is best practice. So update existing code as well. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220529184006.10712-2-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- diff --git a/hw/i386/microvm-dt.c b/hw/i386/microvm-dt.c index 9c3c4995b41..fde74819f2c 100644 --- a/hw/i386/microvm-dt.c +++ b/hw/i386/microvm-dt.c @@ -32,6 +32,7 @@ */ #include "qemu/osdep.h" #include "qemu/cutils.h" +#include "qapi/error.h" #include "sysemu/device_tree.h" #include "hw/char/serial.h" #include "hw/i386/fw_cfg.h" @@ -187,8 +188,8 @@ static void dt_add_ioapic(MicrovmMachineState *mms, SysBusDevice *dev) static void dt_add_isa_serial(MicrovmMachineState *mms, ISADevice *dev) { const char compat[] = "ns16550"; - uint32_t irq = object_property_get_int(OBJECT(dev), "irq", NULL); - hwaddr base = object_property_get_int(OBJECT(dev), "iobase", NULL); + uint32_t irq = object_property_get_int(OBJECT(dev), "irq", &error_fatal); + hwaddr base = object_property_get_int(OBJECT(dev), "iobase", &error_fatal); hwaddr size = 8; char *nodename;