From mboxrd@z Thu Jan 1 00:00:00 1970 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 13A7AC433F5 for ; Wed, 24 Nov 2021 22:23:56 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CEBD183744; Wed, 24 Nov 2021 23:23:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (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=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Rc1F4U/3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 67A1C82FDC; Wed, 24 Nov 2021 23:22:47 +0100 (CET) Received: from mail-ua1-x930.google.com (mail-ua1-x930.google.com [IPv6:2607:f8b0:4864:20::930]) (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 6F38582FDC for ; Wed, 24 Nov 2021 23:22:36 +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@google.com Received: by mail-ua1-x930.google.com with SMTP id n6so8318490uak.1 for ; Wed, 24 Nov 2021 14:22:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:from:in-reply-to:references:date:message-id :subject:to:cc; bh=Ngfzisr5qbHlzQndb8KLILoYkdCyw+davYF5/w2cWM8=; b=Rc1F4U/3ecmesDbhDjFM9sot5t7cdOgG9F+6gdDE4jQyfYauq7mdvpbEvBI8jdg3Gj HFHSFZdpqlhGEGkXYm5c0amSvGDVPbf6fXaoK7mbRbhbGGZfgmDHLuydW7hKTlHhQoO/ Ev8yUDsdSDCfLpC5PMOJnHO8qRiqLes3JskOM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:sender:from:in-reply-to:references :date:message-id:subject:to:cc; bh=Ngfzisr5qbHlzQndb8KLILoYkdCyw+davYF5/w2cWM8=; b=ZMb/wvDR9HJA3MgCrlm1Oejq0vggdCL1Q3BBG2yXJyWi5lL0Midsd7Kdjd5r/LwKWP 4Y+1t6b0Mb9OkQkMmqluV8+gQhJVbf1Ue6cYcfMGMbrZXJ39YfC+79BNLITHlgRcOltO LLILNxX6RIf347Ff3jhzonhL5gSM78yOMIkt+mFue99K9OPkzpWYkihxisRyHmf2G4No 9wteDUa5pOXL6IWrYr45G2gal6Q9yX3aiYZS6+zq45hCYnFKcFCTOH8vBVZioQreyDQ0 w1DS9qTsWbGu0ywS6YxyG6Ttw9W7xEU2F5e+bKr40PlSPqv5tRrOd4SdfTCJ4l4ibyg9 5z4Q== X-Gm-Message-State: AOAM531lCZCq6D1vqGfeNBCgNB2dGniqCOhvREUHAER+v4luia8iCtfv FCiwMQk7pQpWgV769xTAjdwuZIpt1ols9vdg9gvRFg== X-Google-Smtp-Source: ABdhPJzQxmOPZNYga6K0wx2BCwJOcieQd9VvcNPF5OHicbk65IB6UKFP3GifADzNX2SeTlNyWZ5DFXcMFnZ9FXG/RQI= X-Received: by 2002:a67:e109:: with SMTP id d9mr742709vsl.19.1637792555059; Wed, 24 Nov 2021 14:22:35 -0800 (PST) Received: from 480794996271 named unknown by gmailapi.google.com with HTTPREST; Wed, 24 Nov 2021 17:22:33 -0500 MIME-Version: 1.0 From: Simon Glass In-Reply-To: <20211023232635.9195-7-sjg@chromium.org> References: <20211023232635.9195-7-sjg@chromium.org> <20211023232635.9195-1-sjg@chromium.org> Date: Wed, 24 Nov 2021 17:22:33 -0500 X-Google-Sender-Auth: FPQIlrINpxdZENYYGXVVn7yHQ1E Message-ID: Subject: Re: [PATCH v2 08/41] disk: part_dos: Fix a NULL pointer error To: Simon Glass Cc: Michal Simek , Heinrich Schuchardt , Tom Rini , Ilias Apalodimas , Daniel Schwierzeck , Steffen Jaeckel , =?UTF-8?B?TWFyZWsgQmVow7pu?= , Lukas Auer , Dennis Gilmore , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 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 When ext is NULL we cannot dereference it. Update the code flow to avoid this, so that layout_mbr_partitions() can be used with partition tables that do not include an extended partition. Signed-off-by: Simon Glass --- (no changes since v1) disk/part_dos.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) Applied to u-boot-dm/next, thanks!