efi_selftest: do not try to close device path protocol

CloseProtocol cannot be called without agent handle.

There is no need to close the device path protocol if
it has been opened without agent handle.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Heinrich Schuchardt 2018-01-11 08:15:56 +01:00 committed by Alexander Graf
parent 32e6fed6e9
commit 5be9744ae7

View file

@ -299,10 +299,10 @@ static int execute(void)
efi_st_error("FreePool failed\n"); efi_st_error("FreePool failed\n");
return EFI_ST_FAILURE; return EFI_ST_FAILURE;
} }
ret = boottime->close_protocol(handles[i], &guid_device_path, /*
NULL, NULL); * CloseProtocol cannot be called without agent handle.
if (ret != EFI_SUCCESS) * There is no need to close the device path protocol.
efi_st_todo("Cannot close device path protocol.\n"); */
} }
ret = boottime->free_pool(handles); ret = boottime->free_pool(handles);
if (ret != EFI_SUCCESS) { if (ret != EFI_SUCCESS) {