qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/3] vmstate registration: check return values


From: Juan Quintela
Subject: Re: [Qemu-devel] [PATCH 3/3] vmstate registration: check return values
Date: Wed, 01 Feb 2017 13:58:59 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

"Dr. David Alan Gilbert (git)" <address@hidden> wrote:
> From: "Dr. David Alan Gilbert" <address@hidden>
>
> Check qdev's call to vmstate_register_with_alias_id; that gets
> most of the common uses; there's hundreds of calls via vmstate_register
> which could get fixed over time.
>
> Signed-off-by: Dr. David Alan Gilbert <address@hidden>
> ---
>  hw/core/qdev.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/core/qdev.c b/hw/core/qdev.c
> index ea97b15..df633d0 100644
> --- a/hw/core/qdev.c
> +++ b/hw/core/qdev.c
> @@ -933,10 +933,12 @@ static void device_set_realized(Object *obj, bool 
> value, Error **errp)
>          }
>  
>          if (qdev_get_vmsd(dev)) {
> -            vmstate_register_with_alias_id(dev, -1, qdev_get_vmsd(dev), dev,
> +            if (vmstate_register_with_alias_id(dev, -1, qdev_get_vmsd(dev), 
> dev,
>                                             dev->instance_id_alias,

Indent this correctly, please.

>                                             dev->alias_required_for_version,
> -                                           NULL);
> +                                           &local_err) < 0) {
> +                goto post_realize_fail;
> +            }
>          }
>  
>          QLIST_FOREACH(bus, &dev->child_bus, sibling) {

Once that is fixed, I am ok with it.

Reviewed-by: Juan Quintela <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]