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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49420C433EF for ; Tue, 26 Oct 2021 03:36:51 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C936160E0B for ; Tue, 26 Oct 2021 03:36:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C936160E0B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8865383655; Tue, 26 Oct 2021 05:34:10 +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="mKZDrqKS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C6D5C835A1; Tue, 26 Oct 2021 05:31:57 +0200 (CEST) Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) (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 946C3835A1 for ; Tue, 26 Oct 2021 05:31:33 +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-io1-xd2e.google.com with SMTP id p142so18439359iod.0 for ; Mon, 25 Oct 2021 20:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eUwXrhlCZYwQFSJBQGWQ1PwAGXsCafotGb+ssmKT2XQ=; b=mKZDrqKS8+esHYA6B+Ysos102e8saLfz7msIiJ0WH+DaWeHYd/wWeRJqHnWUxbhhGG a72YE9WA5v+cPRfxaK6aXALSivhHPbWN6wB/Ti5wyulogSXw3b04i5SAbtG/fDeYt1Ko +X/Qi9aUfLliE5VEJyqjOvnht6gX6Xe14RDPg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eUwXrhlCZYwQFSJBQGWQ1PwAGXsCafotGb+ssmKT2XQ=; b=SvL2JFZxt3pkLHO/mVizqKS+KO2DSDM241S8STH88WQnTXNYbjQa4YvLpIP5PIMLqf P9jKDwEHCRBD0VOcOowYvU6syMYupZjr7KfdE6pjV81QiO2PK3WzQ33oYHWy9FHl1fBh yNyAC7WOdfG3sAy5gHjzR31vAy/uQmU9DuwhJ0TZxG6LOD6/J9Js+7hcFbNAY2jc5jG4 8LsmMFPJjUi2n5aa75TTaLWuZTDz7LzJGBP/0ywtQoIHIqV/URYTX9c5MGb3Xr8xR1ap 0PM5hTZ50P2qq5D6DeeGj3cxOqTUZ9af8ipPugPfL6THPzvGPzqa0JpjoeBGpefDRJMz UrdA== X-Gm-Message-State: AOAM5320wvYILnCErduHjdpiZCjCCXCduuqSxNdDCmtohkyMYmRtWLXN s23V1oSotLzcJOYjfGUY8QJJHKxF9mXd5g== X-Google-Smtp-Source: ABdhPJz/nOWc+saQCk1j3jQq5bgHZz6WzlgDXysF5eU3B2q24iyuDED/96CrQ3Kx+iRNh7rQolO8LQ== X-Received: by 2002:a05:6602:13c6:: with SMTP id o6mr8382667iov.28.1635219092213; Mon, 25 Oct 2021 20:31:32 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id s10sm10127203ild.78.2021.10.25.20.31.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Oct 2021 20:31:31 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Christian Melki , Bin Meng , Tom Rini , Heinrich Schuchardt , Simon Glass , Alexander Graf Subject: [PATCH v3 29/35] efi: Check for failure when initing the app Date: Mon, 25 Oct 2021 21:30:52 -0600 Message-Id: <20211026033058.430010-18-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.1079.g6e70778dc9-goog In-Reply-To: <20211026033058.430010-1-sjg@chromium.org> References: <20211026033058.430010-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean The stub checks for failure with efi_init(). Add this for the app as well. It is unlikely that anything can be done, but we may as well stop. Signed-off-by: Simon Glass --- (no changes since v1) lib/efi/efi_app.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c index 23a65c46fd4..e454f1a1564 100644 --- a/lib/efi/efi_app.c +++ b/lib/efi/efi_app.c @@ -325,8 +325,11 @@ efi_status_t EFIAPI efi_main(efi_handle_t image, efi_status_t ret; /* Set up access to EFI data structures */ - efi_init(priv, "App", image, sys_table); - + ret = efi_init(priv, "App", image, sys_table); + if (ret) { + printf("Failed to set up ARP: err=%lx\n", ret); + return ret; + } efi_set_priv(priv); /* -- 2.33.0.1079.g6e70778dc9-goog