qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Cédric Le Goater" <clg@kaod.org>,
	"Peter Maydell" <peter.maydell@linaro.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Peter Crosthwaite" <peter.crosthwaite@xilinx.com>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH] qom/object: Fix object_child_foreach_recursive() return value
Date: Fri, 8 May 2020 17:31:36 +0200	[thread overview]
Message-ID: <8530616a-1a92-e80e-4b03-c217faabe3e7@redhat.com> (raw)
In-Reply-To: <20200404153340.164861-1-clg@kaod.org>

On 4/4/20 5:33 PM, Cédric Le Goater wrote:
> When recursing, the return value of do_object_child_foreach() is not
> taken into account.
> 
> Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> Fixes: d714b8de7747 ("qom: Add recursive version of object_child_for_each")

Indeed.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---
>   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;
> +                }
>               }
>           }
>       }
> 



      parent reply	other threads:[~2020-05-08 15:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-04 15:33 [PATCH] qom/object: Fix object_child_foreach_recursive() return value Cédric Le Goater
2020-04-06  7:24 ` Cédric Le Goater
2020-04-06 10:18 ` Marc-André Lureau
2020-05-08 14:13 ` Cédric Le Goater
2020-05-08 15:31 ` Philippe Mathieu-Daudé [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8530616a-1a92-e80e-4b03-c217faabe3e7@redhat.com \
    --to=philmd@redhat.com \
    --cc=berrange@redhat.com \
    --cc=clg@kaod.org \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).