From 14ff4e16e60a065286fd5f4bbe305c45db32affc Mon Sep 17 00:00:00 2001 From: Charles Manning Date: Tue, 17 Apr 2012 14:48:18 +1200 Subject: [PATCH] yaffs u-boot: Fix problem if an illegal nand chip number is entered. The bad flash part was being seen as bad but then the function did not bail out. Signed-off-by: Charles Manning --- direct/u-boot/fs/yaffs2/yaffs_uboot_glue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/direct/u-boot/fs/yaffs2/yaffs_uboot_glue.c b/direct/u-boot/fs/yaffs2/yaffs_uboot_glue.c index c9d5604..f4a3eb6 100644 --- a/direct/u-boot/fs/yaffs2/yaffs_uboot_glue.c +++ b/direct/u-boot/fs/yaffs2/yaffs_uboot_glue.c @@ -183,6 +183,7 @@ void cmd_yaffs_devconfig(char *_mp, int flash_dev, int start_block, int end_bloc if(flash_dev >= CONFIG_SYS_MAX_NAND_DEVICE) { printf("Flash device invalid\n"); + goto err; } if(end_block == 0) -- 2.30.2