9
0
Fork 0

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>
This commit is contained in:
Lucas Stach 2016-03-02 21:50:35 +01:00 committed by Sascha Hauer
parent 92e82d9e26
commit cd0966b813
1 changed files with 1 additions and 1 deletions

View File

@ -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);