From nobody Mon Feb 9 22:38:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1586732816; cv=none; d=zohomail.com; s=zohoarc; b=FR0n0a1YTkO2G8sCcR4NHXS66Jbh3uzSTcodOyV91RwJY5VK5UBUkWEAWtvZrvotd+RThjC3h/hPZYOWgx+TV9OMryzr9UO4EsQk8CTbSbI2dWZHdS4jCTJMW/3QosVzmObThtOQFtm8V/RaxKyqysPRB6tRvAlkcbzCmTtq2Vc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586732816; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=N0E+d7bBUYfONWd9t3x+rqRRRnhm3na+/bNuaZR/bws=; b=iAGasCmVBSRsfGGRJGBdoQqhY8lLt7fKpBS3OECHQzOtnxmdOEcmGTEilnKPpqIGVqZ8ds7WFFKt79g1yfgyr2Hpp5vnj6B2cj9SYHqRcK96FkQRtqKtQsy3dB8nalawKxv2/Th3L5enWwY4E19DgouK9d6Zy/j9JNMKnpo0GiA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1586732816684784.6309247862788; Sun, 12 Apr 2020 16:06:56 -0700 (PDT) Received: from localhost ([::1]:38554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNlgl-0006Tf-7X for importer@patchew.org; Sun, 12 Apr 2020 19:06:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50472) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNlJq-0002y4-KE for qemu-devel@nongnu.org; Sun, 12 Apr 2020 18:43:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNlJp-0006Sp-IK for qemu-devel@nongnu.org; Sun, 12 Apr 2020 18:43:14 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:33185) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jNlJp-0006R4-CI; Sun, 12 Apr 2020 18:43:13 -0400 Received: by mail-wr1-x442.google.com with SMTP id a25so8572455wrd.0; Sun, 12 Apr 2020 15:43:10 -0700 (PDT) Received: from localhost.localdomain (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id f63sm12083825wma.47.2020.04.12.15.43.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Apr 2020 15:43:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=N0E+d7bBUYfONWd9t3x+rqRRRnhm3na+/bNuaZR/bws=; b=TXzR3CUFbWGYmHC4/zzLDdvd2w4OlACatu8wYiHZzAlaXc3zyUndgf8jLU39pvT8tk FBWtdmnfkKKxn3pLN6t3uGWqqAkqoa/OwLoUcjsagQnnpy236JBMk2cSjKV/LauaIo4r w75g5GEH9OCME1plcfyOC+ZzbfaQ7o7Nx/75caa8RdcsI1ELv/NLeDvfg6zbrfeRSkj3 p8MdED05vqnh4UdR8X9DUeiafdumM+PYPBHm0uJf9JYWSYuUT2MFfaHIfZ4pPUhogXZ8 eTubcNEK0SoUThiHDZpn0yKFZDfvvhyufq25+IRBGp6Y69Dc6wTiLFH/qkzhHY34E6TI 5x7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=N0E+d7bBUYfONWd9t3x+rqRRRnhm3na+/bNuaZR/bws=; b=rWao2I3PtC5//EMudhd3uVGo332ETULN3QkfqyKt9rJdCeR8Je53LkI1nmL2+RDgGj SZdEemsdpiv+RbavfrKjLLuyF4Y5je04OsOzAL/iNy8OOSnJ1MCp3UD07Z8xhvmZFv8U E2Jhhb1/Ejc+XTIq0uhP9shi3iM5Lo+zaskx7E8RkyIN+rt1G8FGPxYFlpI7fGSwejuV s9Cpz4Z2erDrI6+KLNXeotKTrlRIPlGgvudBF/M12WKZMkviWjfjcXioc08gbuQWhW7V t5bUuddoDgoRCtXTDvPpywUx0ZeS9I5NLkGk86ROV3NuVoCFK6ViIU8VRSSnoaGNzpXl PA9g== X-Gm-Message-State: AGi0PuY+WdlbqLBvEZ4UGKjj0sk1UFu5gy/8o4BvseV+yx3VI9Qjm9o3 UEQB+55fEFCzE+7ENx8NJJcudABRrNEeKA== X-Google-Smtp-Source: APiQypJfispSpx6Qo3oU4o6h8RX9ggAeVMwgqiQlP10DLla1Gif+sbKm4ncVsjygxhyrDcOeSB3hzA== X-Received: by 2002:adf:f98b:: with SMTP id f11mr15742291wrr.259.1586731389248; Sun, 12 Apr 2020 15:43:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.1 v3 22/23] hw/riscv/sifive_u: Add missing error-propagation code Date: Mon, 13 Apr 2020 00:41:43 +0200 Message-Id: <20200412224144.12205-23-f4bug@amsat.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200412224144.12205-1-f4bug@amsat.org> References: <20200412224144.12205-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 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: Peter Maydell , Sagar Karandikar , "Michael S. Tsirkin" , Jason Wang , Mark Cave-Ayland , Alistair Francis , "Edgar E. Iglesias" , Subbaraya Sundeep , qemu-block@nongnu.org, Markus Armbruster , Aleksandar Markovic , Max Reitz , Joel Stanley , Palmer Dabbelt , Aleksandar Rikalo , David Gibson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , Alistair Francis , Beniamino Galvani , qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Richard Henderson , Kevin Wolf , qemu-riscv@nongnu.org, Andrew Jeffery , Bastian Koppelmann , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Baumann , Jean-Christophe Dubois , Michael Walle , qemu-ppc@nongnu.org, Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Patch created mechanically by running: $ spatch \ --macro-file scripts/cocci-macro-file.h --include-headers \ --sp-file scripts/coccinelle/add-missing-error_propagate.cocci \ --keep-comments --smpl-spacing --dir hw Reviewed-by: Alistair Francis Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/riscv/sifive_u.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index b07526aba1..b6c27bc970 100644 --- a/hw/riscv/sifive_u.c +++ b/hw/riscv/sifive_u.c @@ -574,9 +574,17 @@ static void riscv_sifive_u_soc_realize(DeviceState *de= v, Error **errp) SIFIVE_SIP_BASE, SIFIVE_TIMECMP_BASE, SIFIVE_TIME_BASE, false); =20 object_property_set_bool(OBJECT(&s->prci), true, "realized", &err); + if (err) { + error_propagate(errp, err); + return; + } sysbus_mmio_map(SYS_BUS_DEVICE(&s->prci), 0, memmap[SIFIVE_U_PRCI].bas= e); =20 object_property_set_bool(OBJECT(&s->otp), true, "realized", &err); + if (err) { + error_propagate(errp, err); + return; + } sysbus_mmio_map(SYS_BUS_DEVICE(&s->otp), 0, memmap[SIFIVE_U_OTP].base); =20 for (i =3D 0; i < SIFIVE_U_PLIC_NUM_SOURCES; i++) { --=20 2.21.1