diff mbox

qdev: Report errors collected during device realization

Message ID 517E68FC.6030400@siemens.com
State New
Headers show

Commit Message

Jan Kiszka April 29, 2013, 12:35 p.m. UTC
Better than just releasing the error object silently.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/core/qdev.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Andreas Färber April 29, 2013, 2:31 p.m. UTC | #1
Am 29.04.2013 14:35, schrieb Jan Kiszka:
> 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>

but CC'ing monitor guys to verify this is the right print function.

Andreas

> ---
>  hw/core/qdev.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/core/qdev.c b/hw/core/qdev.c
> index 4eb0134..ab1d8f5 100644
> --- a/hw/core/qdev.c
> +++ b/hw/core/qdev.c
> @@ -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;
>
Anthony Liguori April 30, 2013, 6:58 p.m. UTC | #2
Applied.  Thanks.

Regards,

Anthony Liguori
diff mbox

Patch

diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 4eb0134..ab1d8f5 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -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;