From: Michael Olbrich <m.olbrich@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Michael Olbrich <m.olbrich@pengutronix.de>
Subject: [PATCH 1/2] EFI: fix error handling in efi_get_boot()
Date: Tue, 12 Aug 2014 11:37:20 +0200 [thread overview]
Message-ID: <1407836241-17620-1-git-send-email-m.olbrich@pengutronix.de> (raw)
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
next reply other threads:[~2014-08-12 9:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-12 9:37 Michael Olbrich [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1407836241-17620-1-git-send-email-m.olbrich@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox