Hi,

On Sat, Apr 4, 2020 at 5:34 PM Cédric Le Goater <[email protected]> wrote:
>
> When recursing, the return value of do_object_child_foreach() is not
> taken into account.
>
> Cc: Peter Crosthwaite <[email protected]>
> Fixes: d714b8de7747 ("qom: Add recursive version of object_child_for_each")
> Signed-off-by: Cédric Le Goater <[email protected]>

Reviewed-by: Marc-André Lureau <[email protected]>


> ---
>  qom/object.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/qom/object.c b/qom/object.c
> index 1812f792247d..b68a707a5e65 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -1057,7 +1057,10 @@ static int do_object_child_foreach(Object *obj,
>                  break;
>              }
>              if (recurse) {
> -                do_object_child_foreach(child, fn, opaque, true);
> +                ret = do_object_child_foreach(child, fn, opaque, true);
> +                if (ret != 0) {
> +                    break;
> +                }
>              }
>          }
>      }
> --
> 2.25.1
>
>


-- 
Marc-André Lureau

Reply via email to