From nobody Mon Feb 9 13:32:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530023061147651.4100923661646; Tue, 26 Jun 2018 07:24:21 -0700 (PDT) Received: from localhost ([::1]:53019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXot8-00019A-NC for importer@patchew.org; Tue, 26 Jun 2018 10:24:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXorV-0000Qa-Ml for qemu-devel@nongnu.org; Tue, 26 Jun 2018 10:22:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXorS-0004xu-JI for qemu-devel@nongnu.org; Tue, 26 Jun 2018 10:22:29 -0400 Received: from 2.mo178.mail-out.ovh.net ([46.105.39.61]:49268) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fXorS-0004tY-D9 for qemu-devel@nongnu.org; Tue, 26 Jun 2018 10:22:26 -0400 Received: from player158.ha.ovh.net (unknown [10.109.105.47]) by mo178.mail-out.ovh.net (Postfix) with ESMTP id BAB821C835 for ; Tue, 26 Jun 2018 16:22:24 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-TOU-1-49-10.w86-201.abo.wanadoo.fr [86.201.141.10]) (Authenticated sender: clg@kaod.org) by player158.ha.ovh.net (Postfix) with ESMTPSA id 467C662009E; Tue, 26 Jun 2018 16:22:17 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: David Gibson Date: Tue, 26 Jun 2018 16:22:14 +0200 Message-Id: <20180626142214.27801-1-clg@kaod.org> X-Mailer: git-send-email 2.13.6 MIME-Version: 1.0 X-Ovh-Tracer-Id: 5485384347750075366 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtiedrudehgdejgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 46.105.39.61 Subject: [Qemu-devel] [PATCH] ppc/pnv: fix pnv_core_realize() error handling X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" commit d35aefa9ae15 ("ppc/pnv: introduce a new intc_create() operation to the chip model") changed the object link in the pnv_core_realize() routine but a return was forgotten in case of error, which can lead to more problems afterwards (segv) Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Greg Kurz Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/ppc/pnv_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c index a9f129fc2c5f..9750464bf4a1 100644 --- a/hw/ppc/pnv_core.c +++ b/hw/ppc/pnv_core.c @@ -150,6 +150,7 @@ static void pnv_core_realize(DeviceState *dev, Error **= errp) if (!chip) { error_propagate(errp, local_err); error_prepend(errp, "required link 'chip' not found: "); + return; } =20 pc->threads =3D g_new(PowerPCCPU *, cc->nr_threads); --=20 2.13.6