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

Am 02.04.2013 15:50, schrieb Paolo Bonzini:
> Otherwise, device_unparent will fail to get a canonical path of
> the object.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Andreas Färber <afaerber@suse.de>

Andreas

> ---
>  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);
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  parent reply	other threads:[~2013-04-09 16:36 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
2013-04-09 16:36 ` Andreas Färber [this message]
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=5164438D.5010708@suse.de \
    --to=afaerber@suse.de \
    --cc=pbonzini@redhat.com \
    --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.