public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] efi_loader: fix TEST_PROTOCOL case in OpenProtocol()
@ 2017-09-16 13:26 Rob Clark
  2017-09-17  8:21 ` Heinrich Schuchardt
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Clark @ 2017-09-16 13:26 UTC (permalink / raw)
  To: u-boot

In the TEST_PROTOCOL case, protocol_interface might be NULL, and at any
rate should not be touched.  So skip efi_protocol_open() in this case.

Fixes: "efi_loader: open_info in OpenProtocol"
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
 lib/efi_loader/efi_boottime.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 72a0c932a6..f1f0e021b9 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -1723,7 +1723,7 @@ efi_status_t EFIAPI efi_open_protocol(
 	}
 
 	r = efi_search_protocol(handle, protocol, &handler);
-	if (r != EFI_SUCCESS)
+	if (r != EFI_SUCCESS || attributes == EFI_OPEN_PROTOCOL_TEST_PROTOCOL)
 		goto out;
 
 	r = efi_protocol_open(handler, protocol_interface, agent_handle,
-- 
2.13.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-17 10:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-16 13:26 [U-Boot] [PATCH] efi_loader: fix TEST_PROTOCOL case in OpenProtocol() Rob Clark
2017-09-17  8:21 ` Heinrich Schuchardt
2017-09-17 10:32   ` Rob Clark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox