From patchwork Thu Jul 4 20:17:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 256992 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 970952C0090 for ; Fri, 5 Jul 2013 06:18:13 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 01C324A028; Thu, 4 Jul 2013 22:18:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F4u51oaCn7aC; Thu, 4 Jul 2013 22:18:11 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AC98E4A02A; Thu, 4 Jul 2013 22:18:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D95924A02A for ; Thu, 4 Jul 2013 22:18:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VkSfxO3WBTqV for ; Thu, 4 Jul 2013 22:18:01 +0200 (CEST) X-Greylist: delayed 108280 seconds by postgrey-1.27 at theia; Thu, 04 Jul 2013 22:17:53 CEST X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-gg0-f202.google.com (mail-gg0-f202.google.com [209.85.161.202]) by theia.denx.de (Postfix) with ESMTPS id 0D0A44A028 for ; Thu, 4 Jul 2013 22:17:53 +0200 (CEST) Received: by mail-gg0-f202.google.com with SMTP id h3so142007gge.5 for ; Thu, 04 Jul 2013 13:17:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=KWoag7EW+VoJ7wav8pHssTuw3P+EjZBDXOv0ZaFNNYI=; b=GocTEteNIgbanGay3U6TSSfShOaQyMTJ8D3ydEMinS/UjQ/K+QlhEzRW3HFV8gtX6U 3HeG2Jm8VWSCWmsOLHsoRzAA1GXHj1pNZ5IFwRM4wqRjacKvqsqplo4UQ/MUBOUAV49n gwQ2kEybQNx1kU6vpmPGMpod8++AXfwd8sYQ8tvv2ZTwJRiPeNGCbKnlohJFxegqqZo2 kDokdl4SaD8CowKVDgRJ6FXL1Ns6LA1LPIirHoyV+0jX2i1HmgTolet9Qu78eDmpvh7u lrs2n6QKhF2CjBrC++xECIUeILAugw/nZyH76BLMSXZHMMvRIfZGv3nhAxAwkRGrhI0p gbhA== X-Received: by 10.236.88.231 with SMTP id a67mr3447841yhf.39.1372969072194; Thu, 04 Jul 2013 13:17:52 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id p73si2649897yhh.5.2013.07.04.13.17.52 for (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Thu, 04 Jul 2013 13:17:52 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.83.1]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id 0ADA35A4267; Thu, 4 Jul 2013 13:17:52 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id A7FA516088F; Thu, 4 Jul 2013 13:17:51 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Thu, 4 Jul 2013 13:17:07 -0700 Message-Id: <1372969032-20009-1-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.8.3 X-Gm-Message-State: ALoCoQkk+zX7jEVZENAWbPOlZg3VSBrVZ8VM2LLRhTDeHubvhrsf8JttJ4eay+HjOT7Aba59p3GQC/tjqkZehiicJyfD7Ripfz1fv2AruGhU0lheiTlcGHGrUCmT7J0GrdI4PqpxQnx1pKQ7FqIR0TJs7RmilCqb23G7faJask2yrq4QrRuWECBJyDi7CAqujK6exzAlpawd Cc: Tom Rini Subject: [U-Boot] [PATCH v2 1/5] bootm: Handle errors consistently X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de A recent bootm fix left the error path incomplete. Reinstate this so that failures in bootm stages are handled properly. Signed-off-by: Simon Glass --- Changes in v2: - Correct checking in the no-error case common/cmd_bootm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 02a5013..652513a 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -684,12 +684,8 @@ static int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, if (!ret && (states & BOOTM_STATE_OS_GO)) { ret = boot_selected_os(argc, argv, BOOTM_STATE_OS_GO, images, boot_fn); - if (ret) - goto err; } - return ret; - /* Deal with any fallout */ err: if (iflag) @@ -699,7 +695,7 @@ err: bootstage_error(BOOTSTAGE_ID_DECOMP_UNIMPL); else if (ret == BOOTM_ERR_RESET) do_reset(cmdtp, flag, argc, argv); - else + else if (ret) puts("subcommand not supported\n"); return ret;