From nobody Tue Feb 10 19:09:46 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=1586197250; cv=none; d=zohomail.com; s=zohoarc; b=GbjzfW/Rsm9tzrZxmphYyZxWasWO8U/o0PRDlNWNi2ykGGYBAD92w7H/Zc4y2dEgd/XGlpVC7YscTyW41dFpS3xqPnLbs2zFnrW/GKipg2Ll16baBidKdUiSjetaoqk3VvgK2FrvPHglfKZWlq/Sf0TBdiPS6At5uRAePj2TDiY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586197250; 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=74G8KHhadiGPyGitkFydcSDSAs1meyukZBFpYk9pD6I=; b=S05bwfEBmafvwUUQQkZBfsW4vulthvyYXvUosbq2XkAUpD64UopnsUy8uwO9Bb+PA5xexo98ZvM9viqR0LHnLAq1j49V3gDq1bo4nGOJz3DzqaMVAumX2TTFuexSzaBB0TZABEYbfhAYFLzNRiNDtpU42uKicCUZkIIcKiGqIfU= 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 1586197250912194.33963769814102; Mon, 6 Apr 2020 11:20:50 -0700 (PDT) Received: from localhost ([::1]:36536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLWMb-0007AN-GX for importer@patchew.org; Mon, 06 Apr 2020 14:20:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36583) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLVrS-0002Wy-98 for qemu-devel@nongnu.org; Mon, 06 Apr 2020 13:48:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLVrQ-0003NH-6P for qemu-devel@nongnu.org; Mon, 06 Apr 2020 13:48:38 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:37133) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLVrQ-0003Mq-0E; Mon, 06 Apr 2020 13:48:36 -0400 Received: by mail-wm1-x331.google.com with SMTP id j19so224931wmi.2; Mon, 06 Apr 2020 10:48:35 -0700 (PDT) Received: from x1w.redhat.com (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id a67sm364880wmc.30.2020.04.06.10.48.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 10:48:34 -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=74G8KHhadiGPyGitkFydcSDSAs1meyukZBFpYk9pD6I=; b=ePE6RsG1CEc0Y4fP5dt+8+emPTpD/Ih7zbwBNWAwYrK2Zb9fi/4BGDmqYGl3IHioN6 THNjNH8nzneT5eGy7s0X78BpMzMOnUMXXStcISlrd/t0Tow1q8AOosCwUp5jNj0nm+l8 DppPSo4hJosWL/XGXEth0TSw4LUXXXrVdpF3g3fYQ4PYVfLHcHXn2e34M7h4mr7cn7Ol b8NTiSDNOwfPzzc2eOMaX+ipqrxer9sYqW7slYlo8GXfWjGMytVmQoM3wuY4jVc45PYs DKCUOapPDSU+XoFfYxhX336mvL9LLm79YKlTrhmwuOsUtrab5xeFAkGJ1w1AaHSmO8jN V0dg== 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=74G8KHhadiGPyGitkFydcSDSAs1meyukZBFpYk9pD6I=; b=r1OQ2O4QOTPMve4kGkBXUCgmd0H3Qa3DB4aMaTC2MrvcBi8h0D6FHeDKGceoUfuc5v xS0aN+F7McG4w8wJeOMYpCIb0t5sGKoFlZrcV+1lbm/AMoTVnZtVZS0FWXctBN86GMha zXb1mSWbiMtPJ6sK32KlAY/AhRxTBHWI/zkWoQ7rrqJBT3WY95Bu+y8Gwwd6Gh3KIR4U 4h/R/ZxRr2V76Qq6LaNc6l/PZs3hI9V2UknUwmVZ0spYg9OxdV5aOpHu0AlwWeAar9+c mdHECBJBivfBWz/CtojIYIVVxHFlIyhhkdrICa/NNaScPXZJIhKY0Q98wngnw/ghYjf4 iEkQ== X-Gm-Message-State: AGi0PuYdyVYe8Nxg1YNvyZfrXs1zNOCuKLT1646oZdyzu8aweGiRmfHg ZC+o1jEFVnS5TlTfZzP1EFN0JMTOVTY= X-Google-Smtp-Source: APiQypK/q/IVYaN6qURbBPVowpIN1qrXinNowX2GLuV7bUI18lWfmeH+KGKl939DsEJA6OJOZNVxag== X-Received: by 2002:a7b:c148:: with SMTP id z8mr476504wmi.31.1586195314802; Mon, 06 Apr 2020 10:48:34 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Subject: [PATCH-for-5.1 v2 36/54] hw/block/onenand: Add missing error-propagation code Date: Mon, 6 Apr 2020 19:47:25 +0200 Message-Id: <20200406174743.16956-37-f4bug@amsat.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200406174743.16956-1-f4bug@amsat.org> References: <20200406174743.16956-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::331 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: Kevin Wolf , Peter Maydell , Vladimir Sementsov-Ogievskiy , "open list:Block layer core" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Max Reitz 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/use-error_propagate-in-realize.cocci \ --keep-comments --smpl-spacing --in-place --dir hw Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/block/onenand.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/block/onenand.c b/hw/block/onenand.c index 898ac563a3..1f68dba28b 100644 --- a/hw/block/onenand.c +++ b/hw/block/onenand.c @@ -810,7 +810,11 @@ static void onenand_realize(DeviceState *dev, Error **= errp) s->otp =3D memset(g_malloc((64 + 2) << PAGE_SHIFT), 0xff, (64 + 2) << PAGE_SHIFT); memory_region_init_ram_nomigrate(&s->ram, OBJECT(s), "onenand.ram", - 0xc000 << s->shift, &error_fatal); + 0xc000 << s->shift, &local_err); + if (local_err) { + error_propagate(errp, local_err); + return; + } vmstate_register_ram_global(&s->ram); ram =3D memory_region_get_ram_ptr(&s->ram); s->boot[0] =3D ram + (0x0000 << s->shift); --=20 2.21.1