diff mbox

[U-Boot,V2,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.

Message ID 1413388395-11425-5-git-send-email-guillaume.gardet@free.fr
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Guillaume GARDET Oct. 15, 2014, 3:53 p.m. UTC
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 <guillaume.gardet@free.fr>
Cc: Tom Rini <trini@ti.com>

---
 common/spl/spl_fat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Oct. 27, 2014, 10:21 p.m. UTC | #1
On Wed, Oct 15, 2014 at 05:53:14PM +0200, Guillaume GARDET wrote:

> 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 <guillaume.gardet@free.fr>
> Cc: Tom Rini <trini@ti.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

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;