summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorschspa <schspa@gmail.com>2021-02-26 00:19:10 +0800
committerTom Rini <trini@konsulko.com>2021-03-17 12:50:19 -0400
commit0453411998ed4425c5c1543de53ff7474bd42eea (patch)
tree72e942379387bb5c6bc42c51a0d691b134eb33e7 /common
parent29cbc4babf0a971986cccd73986908d1b8f07bda (diff)
downloadu-boot-0453411998ed4425c5c1543de53ff7474bd42eea.tar.gz
u-boot-0453411998ed4425c5c1543de53ff7474bd42eea.tar.xz
u-boot-0453411998ed4425c5c1543de53ff7474bd42eea.zip
avb: Fix error when partition not found
part_get_info_by_name will return -1 on error, and >0 on success. Signed-off-by: schspa <schspa@gmail.com> Cc: Igor Opaniuk <igor.opaniuk@gmail.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Diffstat (limited to 'common')
-rw-r--r--common/avb_verify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/avb_verify.c b/common/avb_verify.c
index db10d0f21f..0520a71455 100644
--- a/common/avb_verify.c
+++ b/common/avb_verify.c
@@ -369,7 +369,7 @@ static struct mmc_part *get_partition(AvbOps *ops, const char *partition)
}
ret = part_get_info_by_name(mmc_blk, partition, &part->info);
- if (!ret) {
+ if (ret < 0) {
printf("Can't find partition '%s'\n", partition);
goto err;
}