From: Anders Dellien Date: Tue, 22 Jun 2021 09:40:01 +0000 (+0100) Subject: cmd: part: Correct error handling X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=7cb31e399e46a74d1d46e8b64598d86018fa4e0b;p=u-boot.git 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 Reviewed-by: Sean Anderson --- 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; }