From: schspa Date: Thu, 25 Feb 2021 16:19:10 +0000 (+0800) Subject: avb: Fix error when partition not found X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-favicon.png?a=commitdiff_plain;h=0453411998ed4425c5c1543de53ff7474bd42eea;p=u-boot.git 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 Cc: Igor Opaniuk Reviewed-by: Igor Opaniuk --- 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; }