All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH] qom: do nothing on unparent of object without parent
Date: Tue, 09 Apr 2013 18:25:00 +0200	[thread overview]
Message-ID: <516440DC.6010807@redhat.com> (raw)
In-Reply-To: <1364910600-3418-1-git-send-email-pbonzini@redhat.com>

Il 02/04/2013 15:50, Paolo Bonzini ha scritto:
> Otherwise, device_unparent will fail to get a canonical path of
> the object.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  qom/object.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/qom/object.c b/qom/object.c
> index 8818149..093502e 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -362,6 +362,10 @@ static void object_property_del_child(Object *obj, Object *child, Error **errp)
>  
>  void object_unparent(Object *obj)
>  {
> +    if (!obj->parent) {
> +        return;
> +    }
> +
>      object_ref(obj);
>      if (obj->class->unparent) {
>          (obj->class->unparent)(obj);
> 

Ping.

Paolo

  reply	other threads:[~2013-04-09 16:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-02 13:50 [Qemu-devel] [PATCH] qom: do nothing on unparent of object without parent Paolo Bonzini
2013-04-09 16:25 ` Paolo Bonzini [this message]
2013-04-09 16:36 ` Andreas Färber
2013-04-22 18:38 ` Anthony Liguori

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=516440DC.6010807@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.