aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/microvm-dt.c
diff options
context:
space:
mode:
authorBernhard Beschow <shentey@gmail.com>2022-05-29 20:40:04 +0200
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2022-06-11 11:44:50 +0200
commit94c720f39ede609ca659e9e351d634711656dbb4 (patch)
treea79896145fa6bba49c81589939f1a90d4ed8abfc /hw/i386/microvm-dt.c
parent988fb613215993dd0ce642b89ca8182c479d39dd (diff)
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 <shentey@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220529184006.10712-2-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw/i386/microvm-dt.c')
-rw-r--r--hw/i386/microvm-dt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/i386/microvm-dt.c b/hw/i386/microvm-dt.c
index 9c3c4995b4..fde74819f2 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;