Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 258EEC54EBE for ; Thu, 12 Jan 2023 16:50:31 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E4EDA852B6; Thu, 12 Jan 2023 17:50:28 +0100 (CET) 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="Uh44joDD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 71CBA852C4; Thu, 12 Jan 2023 17:50:27 +0100 (CET) Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) (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 6281A8529D for ; Thu, 12 Jan 2023 17:50:24 +0100 (CET) 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-io1-xd30.google.com with SMTP id i70so115176ioa.12 for ; Thu, 12 Jan 2023 08:50:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=6aV5GSE0tAhoZw0d360Wd0KY9Kh5bqOPr+TMun5CLow=; b=Uh44joDDRhukgd9PqTerriIZ1j/TDupv23pZAnzxA6WL4CzxBGJJiAXqSgcuDsembr RoooVXskahcUAVlFLh6ORZnJdDTn5oXRvoPhubVemT+4zyq28BwfN32w+MQi6dd/VBUy bE7oR48wWjrZDTyXP5/bFS1bRI0fCGA/C5txc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6aV5GSE0tAhoZw0d360Wd0KY9Kh5bqOPr+TMun5CLow=; b=2zV1UuB+mSLUEzsCcH3MylGKpNLMLpgbN2372vB3p2OTz0SneIrH0WEjKyi1E4EewR B43LDxCGEAPfi1yXBSRMQ1fpTK0Yu3rlmit7U+PqG0dhOYOZkE8Z/n1VLvcESwUBIvB/ tRSWCnFKzgRfc/DLKMrRjhEq7OtT8TMacs5MzKUMEKnHK+Q8bRlNBRDHY6nTSO2jHFUO gDHdPOEjiugjeB59ZgI+5dKcYW/Bs45mQNFPPP22fmmdGcBn7aVjrwsN9q565/m3ex3i HbYHNhyiOteipfoP5TRiDPNK+l7K54pOZjWNyyBkwKXUbPi3+TTnoGNviroA9Lxoo8pj k3Fw== X-Gm-Message-State: AFqh2koRmh08TlbiR18FyNR5AeP6QWXTCOiZesjlLGmyiqdp3KG7aDVS ykn2f4F368WlCMEswS9VSaN4nssuenZa/eM7 X-Google-Smtp-Source: AMrXdXvWObI2VN24KUsxRjbxBeXakuNDzjnJ9Iy5cHmWirTzQ1hLJIO0kRrci2ndiupO5BdkeAYmdQ== X-Received: by 2002:a6b:c84a:0:b0:6df:3382:b664 with SMTP id y71-20020a6bc84a000000b006df3382b664mr55150325iof.12.1673542222861; Thu, 12 Jan 2023 08:50:22 -0800 (PST) Received: from sjg1.roam.corp.google.com (c-71-56-200-21.hsd1.co.comcast.net. [71.56.200.21]) by smtp.gmail.com with ESMTPSA id bb16-20020a056602381000b006e3a51d5878sm6098566iob.7.2023.01.12.08.50.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 08:50:22 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Karsten Merker , Heinrich Schuchardt Subject: [PATCH] vbe: Allow probing the VBE bootmeth to fail in OS fixup Date: Thu, 12 Jan 2023 09:50:19 -0700 Message-Id: <20230112165020.822157-1-sjg@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean This device is created when there are no bootmeths defined in the device tree. But it cannot be probed with a device tree node. For now, ignore a probe failure. Signed-off-by: Simon Glass Reported-by: Karsten Merker Suggested-by: Heinrich Schuchardt --- boot/vbe_simple_os.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/boot/vbe_simple_os.c b/boot/vbe_simple_os.c index b2041a95a30..3bd0cffc535 100644 --- a/boot/vbe_simple_os.c +++ b/boot/vbe_simple_os.c @@ -72,6 +72,14 @@ static int bootmeth_vbe_simple_ft_fixup(void *ctx, struct event *event) chosen = oftree_path(tree, "/chosen"); if (!ofnode_valid(chosen)) continue; + + ret = device_probe(dev); + if (ret) { + log_warning("VBE device '%s' failed to probe (err=%d)", + dev->name, ret); + return 0; + } + ret = ofnode_add_subnode(chosen, "fwupd", &node); if (ret && ret != -EEXIST) return log_msg_ret("fwu", ret); @@ -80,10 +88,6 @@ static int bootmeth_vbe_simple_ft_fixup(void *ctx, struct event *event) if (ret && ret != -EEXIST) return log_msg_ret("dev", ret); - ret = device_probe(dev); - if (ret) - return log_msg_ret("probe", ret); - /* Copy over the vbe properties for fwupd */ log_debug("Fixing up: %s\n", dev->name); ret = ofnode_copy_props(dev_ofnode(dev), subnode); -- 2.39.0.314.g84b9a713c41-goog