From patchwork Fri Feb 21 03:36:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 1241809 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=201602 header.b=CzlokUDr; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Ny3P5Djgz9sRl for ; Fri, 21 Feb 2020 14:43:13 +1100 (AEDT) Received: from localhost ([::1]:51770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4zDb-0003BY-Jz for incoming@patchwork.ozlabs.org; Thu, 20 Feb 2020 22:43:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49098) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4z7z-0002F9-KQ for qemu-devel@nongnu.org; Thu, 20 Feb 2020 22:37:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j4z7x-0008Ml-R0 for qemu-devel@nongnu.org; Thu, 20 Feb 2020 22:37:23 -0500 Received: from bilbo.ozlabs.org ([2401:3900:2:1::2]:33791 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j4z7x-00080P-Ez; Thu, 20 Feb 2020 22:37:21 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 48NxwG37Lgz9sSV; Fri, 21 Feb 2020 14:37:02 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1582256222; bh=oto2DP51lfwFNY8850lSwPwMGWIzyB8Fptb3GKQeMEM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CzlokUDrjrdyR1xI8BDsyLYN7fvapZewHiN6SYWvCT3DqPzs6BnPF80r97DPGTKK+ skZltN/BTjkp2wPSuuXMvOMAF1BL0wpTezZ3/D0zlG9RuH4neZPi4N0EaC1ziYgz3p Bl6DHdDDvROLhq9IZ7BNlRNvYorOs6jlekzcMeA4= From: David Gibson To: peter.maydell@linaro.org Subject: [PULL 11/20] pnv/phb4: Fix error path in pnv_pec_realize() Date: Fri, 21 Feb 2020 14:36:41 +1100 Message-Id: <20200221033650.444386-12-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200221033650.444386-1-david@gibson.dropbear.id.au> References: <20200221033650.444386-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, aik@ozlabs.ru, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, clg@kaod.org, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Greg Kurz 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 Message-Id: <158153364605.3229002.2796177658957390343.stgit@bahia.lan> Signed-off-by: David Gibson --- 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 68e1db3eac..911d147ffd 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;