diff options
author | Anders Dellien <anders.dellien@arm.com> | 2021-06-22 10:40:01 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-07-23 07:13:25 -0400 |
commit | 7cb31e399e46a74d1d46e8b64598d86018fa4e0b (patch) | |
tree | 60082449540e1270b23862fef72a6a6baa06182b /cmd | |
parent | 2132fce7e1a56d81d5e5bdbd39b8f6500655c815 (diff) | |
download | u-boot-7cb31e399e46a74d1d46e8b64598d86018fa4e0b.tar.gz u-boot-7cb31e399e46a74d1d46e8b64598d86018fa4e0b.tar.bz2 u-boot-7cb31e399e46a74d1d46e8b64598d86018fa4e0b.zip |
cmd: part: Correct error handling
As 'part_get_info_by_name' now returns more status codes than just
-1 to indicate failure, we need to update the return value check.
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/part.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/part.c b/cmd/part.c index 3395c17b89..e0463b5a54 100644 --- a/cmd/part.c +++ b/cmd/part.c @@ -140,7 +140,7 @@ static int do_part_info(int argc, char *const argv[], enum cmd_part_info param) return 1; } else { part = part_get_info_by_name(desc, argv[2], &info); - if (part == -1) + if (part < 0) return 1; } |