mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] EFI: fix error handling in efi_get_boot()
@ 2014-08-12  9:37 Michael Olbrich
  2014-08-12  9:37 ` [PATCH 2/2] EFI: handle more boot devices Michael Olbrich
  2014-09-01  9:03 ` [PATCH 1/2] EFI: fix error handling in efi_get_boot() Sascha Hauer
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Olbrich @ 2014-08-12  9:37 UTC (permalink / raw)
  To: barebox; +Cc: Michael Olbrich

efi_get_global_var() returns an error code, not NULL when it fails.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 arch/efi/efi/efi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/efi/efi/efi.c b/arch/efi/efi/efi.c
index ff97783..7de8ec8 100644
--- a/arch/efi/efi/efi.c
+++ b/arch/efi/efi/efi.c
@@ -104,7 +104,7 @@ struct efi_boot *efi_get_boot(int num)
 
 	free(name);
 
-	if (!buf) {
+	if (IS_ERR(buf)) {
 		free(boot);
 		return NULL;
 	}
-- 
2.0.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-01 10:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-12  9:37 [PATCH 1/2] EFI: fix error handling in efi_get_boot() Michael Olbrich
2014-08-12  9:37 ` [PATCH 2/2] EFI: handle more boot devices Michael Olbrich
2014-09-01  9:06   ` Sascha Hauer
2014-09-01 10:02     ` Michael Olbrich
2014-09-01 10:12       ` Sascha Hauer
2014-09-01  9:03 ` [PATCH 1/2] EFI: fix error handling in efi_get_boot() Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox