[U-Boot] [PATCH 1/2] efi_selftest: creating new handle in controller test

Heinrich Schuchardt xypron.glpk at gmx.de
Fri Sep 28 20:14:16 UTC 2018


When the last protocol interface is uninstalled the handle is deleted but
this does not set the value of the handle to NULL.

To create a new handle with OpenProtocolInterface the value of the handle
must be NULL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 lib/efi_selftest/efi_selftest_controllers.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/efi_selftest/efi_selftest_controllers.c b/lib/efi_selftest/efi_selftest_controllers.c
index e8a80d778da..38720bb63d3 100644
--- a/lib/efi_selftest/efi_selftest_controllers.c
+++ b/lib/efi_selftest/efi_selftest_controllers.c
@@ -134,6 +134,8 @@ static efi_status_t EFIAPI start(
 
 	/* Create child controllers */
 	for (i = 0; i < NUMBER_OF_CHILD_CONTROLLERS; ++i) {
+		/* Creating a new handle for the child controller */
+		handle_child_controller[i] = 0;
 		ret = boottime->install_protocol_interface(
 			&handle_child_controller[i], &guid_child_controller,
 			EFI_NATIVE_INTERFACE, NULL);
-- 
2.19.0



More information about the U-Boot mailing list