提交 9585dd3f 编写于 作者: T Tom Rini

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: NTom Rini <trini@konsulko.com>
上级 d03618d5
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册