summaryrefslogtreecommitdiff
path: root/common/spl
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-08-15 01:01:30 (GMT)
committerTom Rini <trini@konsulko.com>2017-08-20 13:54:30 (GMT)
commit9585dd3fffaa8b7bd37044cc1870a45f2ca0ee3d (patch)
tree9ae5992d93536267e835a590330d63a72d9682bd /common/spl
parentd03618d5cbc3e1fb4f8c63f2e4966f825007ce08 (diff)
downloadu-boot-9585dd3fffaa8b7bd37044cc1870a45f2ca0ee3d.tar.xz
spl: spl_mmc.c Correct blk_dread() return value check
The function blk_dread will return -ENOSYS on failure or on success the number of blocks read, which must be the number asked to read (otherwise it failed somewhere). Correct this check. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common/spl')
-rw-r--r--common/spl/spl_mmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index d95f94c..b2cccc6 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -200,7 +200,7 @@ static int mmc_load_image_raw_os(struct spl_image_info *spl_image,
CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR,
CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS,
(void *) CONFIG_SYS_SPL_ARGS_ADDR);
- if (count == 0) {
+ if (count != CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS) {
#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
puts("mmc_load_image_raw_os: mmc block read error\n");
#endif