spl: mmc: fix partition error

The part_get_info_by_name() return number that is greater than
zero when called successfully.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ib3127f90368e7c2bfb9573c7d17e1e98dc67d9db
This commit is contained in:
Jason Zhu 2020-06-08 22:18:58 +08:00
parent dbf2974739
commit 2e93c98a37
1 changed files with 1 additions and 1 deletions

View File

@ -176,7 +176,7 @@ static int mmc_load_image_raw_partition(struct spl_image_info *spl_image,
partition_name, &info);
else
err = part_get_info(mmc_get_blk_desc(mmc), partition, &info);
if (err) {
if (err < 0) {
#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
puts("spl: partition error\n");
#endif