* [PATCH] cmd: part: Correct error handling
@ 2021-06-22 9:40 Anders Dellien
2021-06-22 14:39 ` Sean Anderson
2021-07-23 12:34 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Anders Dellien @ 2021-06-22 9:40 UTC (permalink / raw)
To: u-boot; +Cc: nd, Anders Dellien
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>
---
cmd/part.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cmd: part: Correct error handling
2021-06-22 9:40 [PATCH] cmd: part: Correct error handling Anders Dellien
@ 2021-06-22 14:39 ` Sean Anderson
2021-07-23 12:34 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Sean Anderson @ 2021-06-22 14:39 UTC (permalink / raw)
To: Anders Dellien, u-boot; +Cc: nd
On 6/22/21 5:40 AM, Anders Dellien wrote:
> 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>
> ---
> cmd/part.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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;
> }
>
>
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cmd: part: Correct error handling
2021-06-22 9:40 [PATCH] cmd: part: Correct error handling Anders Dellien
2021-06-22 14:39 ` Sean Anderson
@ 2021-07-23 12:34 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2021-07-23 12:34 UTC (permalink / raw)
To: Anders Dellien; +Cc: u-boot, nd
[-- Attachment #1: Type: text/plain, Size: 372 bytes --]
On Tue, Jun 22, 2021 at 10:40:01AM +0100, Anders Dellien wrote:
> 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>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-23 12:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-22 9:40 [PATCH] cmd: part: Correct error handling Anders Dellien
2021-06-22 14:39 ` Sean Anderson
2021-07-23 12:34 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.