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:
Jan Kiszka 2013-04-29 14:35:08 +02:00 committed by Anthony Liguori
parent 7e7da8e358
commit cffc5113a4

View File

@ -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;