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:
parent
92e82d9e26
commit
cd0966b813
2
fs/efi.c
2
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);
|
||||
|
|
Loading…
Reference in New Issue