瀏覽代碼

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>
Heinrich Schuchardt 7 年之前
父節點
當前提交
5be9744ae7
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      lib/efi_selftest/efi_selftest_devicepath.c

+ 4 - 4
lib/efi_selftest/efi_selftest_devicepath.c

@@ -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);
-		if (ret != EFI_SUCCESS)
-			efi_st_todo("Cannot close device path protocol.\n");
+		/*
+		 * CloseProtocol cannot be called without agent handle.
+		 * There is no need to close the device path protocol.
+		 */
 	}
 	}
 	ret = boottime->free_pool(handles);
 	ret = boottime->free_pool(handles);
 	if (ret != EFI_SUCCESS) {
 	if (ret != EFI_SUCCESS) {