mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
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>
This commit is contained in:
parent
988fb61321
commit
94c720f39e
1 changed files with 3 additions and 2 deletions
|
@ -32,6 +32,7 @@
|
||||||
*/
|
*/
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "qemu/cutils.h"
|
#include "qemu/cutils.h"
|
||||||
|
#include "qapi/error.h"
|
||||||
#include "sysemu/device_tree.h"
|
#include "sysemu/device_tree.h"
|
||||||
#include "hw/char/serial.h"
|
#include "hw/char/serial.h"
|
||||||
#include "hw/i386/fw_cfg.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)
|
static void dt_add_isa_serial(MicrovmMachineState *mms, ISADevice *dev)
|
||||||
{
|
{
|
||||||
const char compat[] = "ns16550";
|
const char compat[] = "ns16550";
|
||||||
uint32_t irq = object_property_get_int(OBJECT(dev), "irq", NULL);
|
uint32_t irq = object_property_get_int(OBJECT(dev), "irq", &error_fatal);
|
||||||
hwaddr base = object_property_get_int(OBJECT(dev), "iobase", NULL);
|
hwaddr base = object_property_get_int(OBJECT(dev), "iobase", &error_fatal);
|
||||||
hwaddr size = 8;
|
hwaddr size = 8;
|
||||||
char *nodename;
|
char *nodename;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue