From 9d3b56544137b1390b235ed0991a3b5740ceb208 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Thu, 21 May 2015 15:57:16 -0700 Subject: [PATCH] spl: spl_mmc: fix mmc Falcon mode regression 91199f4a5a21a7cf9dd9e7c05e295a042f8c2b7e broke mmc based Falcon mode. The block_read function returns the number of blocks read thus the error check needs to look for a return of 0 blocks read. Cc: Paul Kocialkowski Signed-off-by: Tim Harvey Acked-by: Paul Kocialkowski --- common/spl/spl_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index 5d688d6f0f..c96345eff2 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -76,7 +76,7 @@ static int mmc_load_image_raw_os(struct mmc *mmc) CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR, CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS, (void *)CONFIG_SYS_SPL_ARGS_ADDR); - if (err) { + if (err == 0) { #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT printf("spl: mmc block read error\n"); #endif -- 2.25.1