Message ID | 20220909151801.336551-2-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=i1g8b3Sn; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MPKQL03dqz1yhP for <incoming@patchwork.ozlabs.org>; Sat, 10 Sep 2022 01:18:49 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E29F984B66; Fri, 9 Sep 2022 17:18:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="i1g8b3Sn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4070C84B79; Fri, 9 Sep 2022 17:18:45 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4F5EB84B58 for <u-boot@lists.denx.de>; Fri, 9 Sep 2022 17:18:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-11eab59db71so4644912fac.11 for <u-boot@lists.denx.de>; Fri, 09 Sep 2022 08:18:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=G3LRQTqeorZV/PtgmwxASFaEyXWCRDjBhvjl+TRR9p8=; b=i1g8b3Snr99LytqA2CVivxSTjL3zMW7FGT8v4nqFhW3pwyCcGTsE7KEe3y8Plo52WG /inXigQRQX+7BFlVlsWi8E54D+5utv2Q3w6DBDvPTTzApd6mvgStV/m/VswAwbymfTDR z8Ko5etQxs3Jzf8hQysU3bhRMibogiBdBPzUA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=G3LRQTqeorZV/PtgmwxASFaEyXWCRDjBhvjl+TRR9p8=; b=yJFIF5h9jNwcD/pX4SBTD+nnfCE5/ej8KjuX5VrZuPh3rFFi1SPhcNJSuJkJwCS3k6 zFjfDBJKkkHovULEJzjLNDzIO+4ej+roWRRva8s480wPzcRA1jMYgtMnr4/NbSTtvmzs GD+M+7DWeTuj/jSb3xZlMEY6kTWY4wV1+bAxd/d2u4XOJYS/mVw76qf2nn+V0dFtNoLd v39MZ5AChDE5JCWXN2qfqg3TVwmYGMteZLb1K7Xrq/PsTBUAxFKFdheFario/iwJ6gsY PomK4UTaSYJmSyn+oAebUx4oX4M84vk4Ey8DOB8ZFUgcr7/ni6TPiroEJiBFWo61Ci4M 6JbA== X-Gm-Message-State: ACgBeo1IpARbdEIbjTp4KWOeJnRF1sFBgRBARa811mEqJW0zHfmAhTa6 vLhB7T05sdXNFiTBOhOdeCLwfzIr9T9VSg== X-Google-Smtp-Source: AA6agR4NJoDHmXxiIyjKoNJdANes5u/i69WutlFqMkXBdaAuPDg2KYdMCdySehtyKHvcpYqsqoTAsA== X-Received: by 2002:a05:6870:b692:b0:11d:482f:3642 with SMTP id cy18-20020a056870b69200b0011d482f3642mr5062700oab.38.1662736719305; Fri, 09 Sep 2022 08:18:39 -0700 (PDT) Received: from sjg1.roam.corp.google.com (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id eq22-20020a056870a91600b0012779ba00fesm591977oab.2.2022.09.09.08.18.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Sep 2022 08:18:38 -0700 (PDT) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Cc: Simon Glass <sjg@chromium.org>, Marek Vasut <marex@denx.de>, Pavel Herrmann <morpheus.ibis@gmail.com> Subject: [PATCH 01/14] dm: core: Avoid registering an invalid tree in oftree_ensure() Date: Fri, 9 Sep 2022 09:17:48 -0600 Message-Id: <20220909151801.336551-2-sjg@chromium.org> X-Mailer: git-send-email 2.37.2.789.g6183377224-goog In-Reply-To: <20220909151801.336551-1-sjg@chromium.org> References: <20220909151801.336551-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean |
Series |
vbe: Support device tree fixups for OS requests
|
expand
|
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c index 6bdab6886b6..9a782e7b19f 100644 --- a/drivers/core/ofnode.c +++ b/drivers/core/ofnode.c @@ -51,7 +51,7 @@ static oftree oftree_ensure(void *fdt) oftree tree; int i; - if (gd->flags & GD_FLG_RELOC) { + if (fdt && (gd->flags & GD_FLG_RELOC)) { i = oftree_find(fdt); if (i == -1) { if (oftree_count == CONFIG_OFNODE_MULTI_TREE_MAX) {
If the tree is not valid we should not register it. Update the function to check this first. Signed-off-by: Simon Glass <sjg@chromium.org> --- drivers/core/ofnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)