From patchwork Fri Sep 19 08:47:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Guillaume GARDET X-Patchwork-Id: 391172 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 646D514012C for ; Fri, 19 Sep 2014 18:50:15 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B9F0BA7601; Fri, 19 Sep 2014 10:49:54 +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 v6qWrkjfEalB; Fri, 19 Sep 2014 10:49:54 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 976C1A75F2; Fri, 19 Sep 2014 10:49:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EA15AA75C8 for ; Fri, 19 Sep 2014 10:49:30 +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 6gLV9s4skIjy for ; Fri, 19 Sep 2014 10:49:30 +0200 (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 smtp6-g21.free.fr (smtp6-g21.free.fr [212.27.42.6]) by theia.denx.de (Postfix) with ESMTPS id 34581A75CC for ; Fri, 19 Sep 2014 10:49:23 +0200 (CEST) Received: from OLI01.site (unknown [82.244.147.214]) by smtp6-g21.free.fr (Postfix) with ESMTP id E150582315; Fri, 19 Sep 2014 10:49:16 +0200 (CEST) From: Guillaume GARDET To: u-boot@lists.denx.de Date: Fri, 19 Sep 2014 10:47:34 +0200 Message-Id: <1411116455-20619-5-git-send-email-guillaume.gardet@free.fr> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1411116455-20619-1-git-send-email-guillaume.gardet@free.fr> References: <1411116455-20619-1-git-send-email-guillaume.gardet@free.fr> MIME-Version: 1.0 Cc: Tom Rini Subject: [U-Boot] [PATCH 4/5] spl: do not hang in spl_register_fat_device but return error value. It allows to use both CONFIG_SPL_FAT_SUPPORT and CONFIG_SPL_EXT_SUPPORT. 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Do not hang in spl_register_fat_device but return an error value. It allows to use both CONFIG_SPL_FAT_SUPPORT and CONFIG_SPL_EXT_SUPPORT. If FAT load fails, then EXT load is tried. Signed-off-by: Guillaume GARDET Cc: Albert Aribaud Cc: Stefano Babic Cc: Tom Rini Cc: Michal Simek Cc: Andreas Bießmann --- common/spl/spl_fat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c index 91481fc..350f7d9 100644 --- a/common/spl/spl_fat.c +++ b/common/spl/spl_fat.c @@ -30,7 +30,7 @@ static int spl_register_fat_device(block_dev_desc_t *block_dev, int partition) #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT printf("%s: fat register err - %d\n", __func__, err); #endif - hang(); + return err; } fat_registered = 1;