qdev: Report errors collected during device realization
Better than just releasing the error object silently. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Message-id: 517E68FC.6030400@siemens.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
7e7da8e358
commit
cffc5113a4
@ -162,6 +162,7 @@ int qdev_init(DeviceState *dev)
|
||||
|
||||
object_property_set_bool(OBJECT(dev), true, "realized", &local_err);
|
||||
if (local_err != NULL) {
|
||||
qerror_report_err(local_err);
|
||||
error_free(local_err);
|
||||
qdev_free(dev);
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user