qdev: Convert qdev_unplug() to QError
Note: our device unplug methods don't need conversion work, because they can't currently fail. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
07a5d95a3b
commit
cc601cb785
|
@ -287,8 +287,7 @@ int qdev_init(DeviceState *dev)
|
||||||
int qdev_unplug(DeviceState *dev)
|
int qdev_unplug(DeviceState *dev)
|
||||||
{
|
{
|
||||||
if (!dev->parent_bus->allow_hotplug) {
|
if (!dev->parent_bus->allow_hotplug) {
|
||||||
error_report("Bus %s does not support hotplugging",
|
qerror_report(QERR_BUS_NO_HOTPLUG, dev->parent_bus->name);
|
||||||
dev->parent_bus->name);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
assert(dev->info->unplug != NULL);
|
assert(dev->info->unplug != NULL);
|
||||||
|
|
Loading…
Reference in a new issue