From: schspa <schspa@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH] avb: Fix error when partition not found
Date: Fri, 26 Feb 2021 00:19:10 +0800 [thread overview]
Message-ID: <20210225161910.68035-1-schspa@gmail.com> (raw)
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>
---
common/avb_verify.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
2.24.3 (Apple Git-128)
next reply other threads:[~2021-02-25 16:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-25 16:19 schspa [this message]
2021-02-26 8:49 ` [PATCH] avb: Fix error when partition not found Igor Opaniuk
2021-03-18 16:56 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210225161910.68035-1-schspa@gmail.com \
--to=schspa@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox