summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2014-08-12 11:37:20 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-09-01 14:24:50 +0200
commit53c443ce723454fec8dca9d133ae128619a3e40f (patch)
tree2bfa64d3c523504b847ac9a365f58adfc9bc3c37
parentd3f4aa52caf716658ebbf62f107f27ad0c78ffe3 (diff)
downloadbarebox-53c443ce723454fec8dca9d133ae128619a3e40f.tar.gz
EFI: fix error handling in efi_get_boot()
efi_get_global_var() returns an error code, not NULL when it fails. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/efi/efi/efi.c2
1 files changed, 1 insertions, 1 deletions
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;
}