* [U-Boot] [PATCH 1/1] efi_selftest: correctly check return values
@ 2017-10-12 23:00 Heinrich Schuchardt
2017-10-22 14:33 ` Simon Glass
0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2017-10-12 23:00 UTC (permalink / raw)
To: u-boot
When cancelling the timer we should check the return
value provided by the set_timer service.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
lib/efi_selftest/efi_selftest_events.c | 2 +-
lib/efi_selftest/efi_selftest_tpl.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/efi_selftest/efi_selftest_events.c b/lib/efi_selftest/efi_selftest_events.c
index b2cdc150da..081f31257f 100644
--- a/lib/efi_selftest/efi_selftest_events.c
+++ b/lib/efi_selftest/efi_selftest_events.c
@@ -186,7 +186,7 @@ static int execute(void)
return EFI_ST_FAILURE;
}
ret = boottime->set_timer(event_wait, EFI_TIMER_STOP, 0);
- if (index != 0) {
+ if (ret != EFI_SUCCESS) {
efi_st_error("Could not cancel timer\n");
return EFI_ST_FAILURE;
}
diff --git a/lib/efi_selftest/efi_selftest_tpl.c b/lib/efi_selftest/efi_selftest_tpl.c
index b8c0e70262..ddb67ed268 100644
--- a/lib/efi_selftest/efi_selftest_tpl.c
+++ b/lib/efi_selftest/efi_selftest_tpl.c
@@ -207,7 +207,7 @@ static int execute(void)
return EFI_ST_FAILURE;
}
ret = boottime->set_timer(event_wait, EFI_TIMER_STOP, 0);
- if (index != 0) {
+ if (ret != EFI_SUCCESS) {
efi_st_error("Could not cancel timer\n");
return EFI_ST_FAILURE;
}
--
2.14.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH 1/1] efi_selftest: correctly check return values
2017-10-12 23:00 [U-Boot] [PATCH 1/1] efi_selftest: correctly check return values Heinrich Schuchardt
@ 2017-10-22 14:33 ` Simon Glass
0 siblings, 0 replies; 2+ messages in thread
From: Simon Glass @ 2017-10-22 14:33 UTC (permalink / raw)
To: u-boot
On 13 October 2017 at 01:00, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> When cancelling the timer we should check the return
> value provided by the set_timer service.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> lib/efi_selftest/efi_selftest_events.c | 2 +-
> lib/efi_selftest/efi_selftest_tpl.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
Although I favour:
if (ref)
instead of:
if (ret != EFI_SUCCESS)
0 is the standard value for success in U-Boot.
Regards,
Simon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-22 14:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-12 23:00 [U-Boot] [PATCH 1/1] efi_selftest: correctly check return values Heinrich Schuchardt
2017-10-22 14:33 ` Simon Glass
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.