diff options
author | Markus Armbruster <armbru@redhat.com> | 2020-06-10 07:32:46 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-06-15 22:06:04 +0200 |
commit | c835fac3f074f85c6d61bcc77c509816fdf27080 (patch) | |
tree | ca62c1c373c2e13d56b7b74fc371f589fb19c803 /hw | |
parent | ce189ab230bd3472ada876bf7568221342ee6dbb (diff) | |
download | qemu-c835fac3f074f85c6d61bcc77c509816fdf27080.zip qemu-c835fac3f074f85c6d61bcc77c509816fdf27080.tar.gz qemu-c835fac3f074f85c6d61bcc77c509816fdf27080.tar.bz2 |
qdev: qdev_init_nofail() is now unused, drop
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200610053247.1583243-58-armbru@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/core/qdev.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 5033616..2131c7f 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -378,35 +378,6 @@ void qdev_simple_device_unplug_cb(HotplugHandler *hotplug_dev, /* * Realize @dev. - * Device properties should be set before calling this function. IRQs - * and MMIO regions should be connected/mapped after calling this - * function. - * On failure, report an error with error_report() and terminate the - * program. This is okay during machine creation. Don't use for - * hotplug, because there callers need to recover from failure. - * Exception: if you know the device's init() callback can't fail, - * then qdev_init_nofail() can't fail either, and is therefore usable - * even then. But relying on the device implementation that way is - * somewhat unclean, and best avoided. - */ -void qdev_init_nofail(DeviceState *dev) -{ - Error *err = NULL; - - assert(!dev->realized); - - object_ref(OBJECT(dev)); - object_property_set_bool(OBJECT(dev), true, "realized", &err); - if (err) { - error_reportf_err(err, "Initialization of device %s failed: ", - object_get_typename(OBJECT(dev))); - exit(1); - } - object_unref(OBJECT(dev)); -} - -/* - * Realize @dev. * @dev must not be plugged into a bus. * If @bus, plug @dev into @bus. This takes a reference to @dev. * If @dev has no QOM parent, make one up, taking another reference. |