qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: groug@kaod.org
Cc: clg@kaod.org, qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
	David Gibson <david@gibson.dropbear.id.au>
Subject: [Qemu-devel] [PATCHv3 2/7] pnv: Fix some error handling cpu realize()
Date: Thu, 14 Jun 2018 14:41:24 +1000	[thread overview]
Message-ID: <20180614044129.13606-3-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <20180614044129.13606-1-david@gibson.dropbear.id.au>

In pnv_core_realize() we call two functions with an Error * parameter in
succession, which will go badly if they both cause errors.  In fact, a
failure in either of them indicates a qemu internal error, so we can just
use &error_abort in both cases.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 hw/ppc/pnv_core.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c
index 13ad7d9e04..01f47c8037 100644
--- a/hw/ppc/pnv_core.c
+++ b/hw/ppc/pnv_core.c
@@ -172,12 +172,9 @@ static void pnv_core_realize(DeviceState *dev, Error **errp)
         object_initialize(obj, size, typename);
 
         snprintf(name, sizeof(name), "thread[%d]", i);
-        object_property_add_child(OBJECT(pc), name, obj, &local_err);
+        object_property_add_child(OBJECT(pc), name, obj, &error_abort);
         object_property_add_alias(obj, "core-pir", OBJECT(pc),
-                                  "pir", &local_err);
-        if (local_err) {
-            goto err;
-        }
+                                  "pir", &error_abort);
         object_unref(obj);
     }
 
-- 
2.17.1

  parent reply	other threads:[~2018-06-14  4:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-14  4:41 [Qemu-devel] [PATCHv3 0/7] Better handling of machine specific per-cpu information David Gibson
2018-06-14  4:41 ` [Qemu-devel] [PATCHv3 1/7] spapr: Clean up cpu realize/unrealize paths David Gibson
2018-06-14  4:41 ` David Gibson [this message]
2018-06-14  5:26   ` [Qemu-devel] [PATCHv3 2/7] pnv: Fix some error handling cpu realize() Cédric Le Goater
2018-06-14  6:35   ` Greg Kurz
2018-06-14  4:41 ` [Qemu-devel] [PATCHv3 3/7] pnv_core: Allocate cpu thread objects individually David Gibson
2018-06-14  4:41 ` [Qemu-devel] [PATCHv3 4/7] pnv: Clean up cpu realize path David Gibson
2018-06-14  4:41 ` [Qemu-devel] [PATCHv3 5/7] pnv: Add cpu unrealize path David Gibson
2018-06-14  4:41 ` [Qemu-devel] [PATCHv3 6/7] target/ppc: Replace intc pointer with a general machine_data pointer David Gibson
2018-06-14  5:30   ` Cédric Le Goater
2018-06-14 13:34   ` Greg Kurz
2018-06-15  0:19     ` David Gibson
2018-06-14 15:20   ` Cédric Le Goater
2018-06-15  1:34     ` David Gibson
2018-06-14  4:41 ` [Qemu-devel] [PATCHv3 7/7] target/ppc, spapr: Move VPA information to machine_data David Gibson

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=20180614044129.13606-3-david@gibson.dropbear.id.au \
    --to=david@gibson.dropbear.id.au \
    --cc=clg@kaod.org \
    --cc=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).