From: Greg Kurz <groug@kaod.org>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: [PATCH 2/3] pnv/phb4: Fix error path in pnv_pec_realize()
Date: Wed, 12 Feb 2020 19:54:06 +0100 [thread overview]
Message-ID: <158153364605.3229002.2796177658957390343.stgit@bahia.lan> (raw)
In-Reply-To: <158153363409.3229002.13469293798150754920.stgit@bahia.lan>
Obviously, we want to pass &local_err so that we can check it then
line below, not errp.
Reported-by: Coverity CID 1419395 'Constant' variable guards dead code
Fixes: 4f9924c4d4cf "ppc/pnv: Add models for POWER9 PHB4 PCIe Host bridge"
Signed-off-by: Greg Kurz <groug@kaod.org>
---
hw/pci-host/pnv_phb4_pec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci-host/pnv_phb4_pec.c b/hw/pci-host/pnv_phb4_pec.c
index 68e1db3eac4f..911d147ffd7d 100644
--- a/hw/pci-host/pnv_phb4_pec.c
+++ b/hw/pci-host/pnv_phb4_pec.c
@@ -391,7 +391,7 @@ static void pnv_pec_realize(DeviceState *dev, Error **errp)
object_property_set_int(stk_obj, i, "stack-no", &error_abort);
object_property_set_link(stk_obj, OBJECT(pec), "pec", &error_abort);
- object_property_set_bool(stk_obj, true, "realized", errp);
+ object_property_set_bool(stk_obj, true, "realized", &local_err);
if (local_err) {
error_propagate(errp, local_err);
return;
next prev parent reply other threads:[~2020-02-12 18:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-12 18:53 [PATCH 0/3] pnv: Fix a couple of issues reported by Coverity Greg Kurz
2020-02-12 18:54 ` [PATCH 1/3] pnv/phb3: Convert 1u to 1ull Greg Kurz
2020-02-12 18:54 ` Greg Kurz [this message]
2020-02-12 18:54 ` [PATCH 3/3] pnv/phb3: Add missing break statement Greg Kurz
2020-02-12 23:49 ` [PATCH 0/3] pnv: Fix a couple of issues reported by Coverity 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=158153364605.3229002.2796177658957390343.stgit@bahia.lan \
--to=groug@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=peter.maydell@linaro.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 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.