summaryrefslogtreecommitdiffstats
path: root/fs/efi.c
diff options
context:
space:
mode:
authorLucas Stach <dev@lynxeye.de>2016-03-02 21:50:35 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-03-04 07:54:58 +0100
commitcd0966b813755b237869636265268b9fa5e9fd5b (patch)
tree9666f9c91992836d14120133b1205d4289b3d21e /fs/efi.c
parent92e82d9e26229b463c984ab23243b13cbdcdaeec (diff)
downloadbarebox-cd0966b813755b237869636265268b9fa5e9fd5b.tar.gz
barebox-cd0966b813755b237869636265268b9fa5e9fd5b.tar.xz
fs: efi: avoid comparison with uninitialized variable
volume will only be initialized when efi_loaded_image is set. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs/efi.c')
-rw-r--r--fs/efi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/efi.c b/fs/efi.c
index a7adcb98db..0f74cdafff 100644
--- a/fs/efi.c
+++ b/fs/efi.c
@@ -527,7 +527,7 @@ int efi_fs_probe(struct efi_device *efidev)
BS->handle_protocol(efi_loaded_image->device_handle,
&efi_simple_file_system_protocol_guid, (void*)&volume);
- if (efidev->protocol == volume)
+ if (efi_loaded_image && efidev->protocol == volume)
path = xstrdup("/boot");
else
path = asprintf("/efi%d", index);