diff options
author | Markus Armbruster <armbru@redhat.com> | 2020-06-10 07:32:13 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-06-15 22:05:28 +0200 |
commit | 7e272a0001ab7a9f3d2e14e1829bc6f522440eca (patch) | |
tree | c539421e0d57cd1471580119d94280e002a76a43 /hw/ssi | |
parent | 57d479c9c6c69cd856f77360e116f25e73e40566 (diff) | |
download | qemu-7e272a0001ab7a9f3d2e14e1829bc6f522440eca.zip |
ssi: Convert last use of ssi_create_slave_no_init() manually
Same transformation as in the previous commit. Manual, because
convincing Coccinelle to transform this case is not worthwhile.
Cc: Alistair Francis <alistair@alistair23.me>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200610053247.1583243-25-armbru@redhat.com>
Diffstat (limited to 'hw/ssi')
-rw-r--r-- | hw/ssi/ssi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/ssi/ssi.c b/hw/ssi/ssi.c index 54106f5ef8..58e7d904db 100644 --- a/hw/ssi/ssi.c +++ b/hw/ssi/ssi.c @@ -16,6 +16,7 @@ #include "hw/ssi/ssi.h" #include "migration/vmstate.h" #include "qemu/module.h" +#include "qapi/error.h" struct SSIBus { BusState parent_obj; @@ -96,9 +97,9 @@ DeviceState *ssi_create_slave_no_init(SSIBus *bus, const char *name) DeviceState *ssi_create_slave(SSIBus *bus, const char *name) { - DeviceState *dev = ssi_create_slave_no_init(bus, name); + DeviceState *dev = qdev_new(name); - qdev_init_nofail(dev); + qdev_realize_and_unref(dev, &bus->parent_obj, &error_fatal); return dev; } |