public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 1/5] efi_loader: check the status of disconnected drivers
@ 2023-06-15 14:39 Ilias Apalodimas
  2023-06-15 14:39 ` [PATCH 2/5] efi_loader: reconnect drivers on failure Ilias Apalodimas
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Ilias Apalodimas @ 2023-06-15 14:39 UTC (permalink / raw)
  To: u-boot; +Cc: Ilias Apalodimas, Heinrich Schuchardt

efi_uninstall_protocol() calls efi_disconnect_all_drivers() but never
checks the return value.  Honor that and return an appropriate error
if the associated controllers failed to disconnect

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
 lib/efi_loader/efi_boottime.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 5006c0e1e4af..68198e6b5ff6 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -1353,7 +1353,11 @@ static efi_status_t efi_uninstall_protocol
 	if (r != EFI_SUCCESS)
 		goto out;
 	/* Disconnect controllers */
-	efi_disconnect_all_drivers(efiobj, protocol, NULL);
+	r = efi_disconnect_all_drivers(efiobj, protocol, NULL);
+	if (r != EFI_SUCCESS) {
+		r = EFI_DEVICE_ERROR;
+		goto out;
+	}
 	/* Close protocol */
 	list_for_each_entry_safe(item, pos, &handler->open_infos, link) {
 		if (item->info.attributes ==
-- 
2.39.2


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

end of thread, other threads:[~2023-06-19  7:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-15 14:39 [PATCH 1/5] efi_loader: check the status of disconnected drivers Ilias Apalodimas
2023-06-15 14:39 ` [PATCH 2/5] efi_loader: reconnect drivers on failure Ilias Apalodimas
2023-06-15 14:39 ` [PATCH 3/5] efi_loader: disconnect all controllers when uninstalling a protocol Ilias Apalodimas
2023-06-19  7:03   ` Heinrich Schuchardt
2023-06-19  7:43     ` Ilias Apalodimas
2023-06-15 14:39 ` [PATCH 4/5] efi_loader: fix the return codes of UninstallProtocol Ilias Apalodimas
2023-06-18  7:08   ` Heinrich Schuchardt
2023-06-15 14:39 ` [PATCH 5/5] efi_selftests: add extra testcases on controller handling Ilias Apalodimas
2023-06-18  6:39 ` [PATCH 1/5] efi_loader: check the status of disconnected drivers Heinrich Schuchardt
2023-06-18 14:19   ` Ilias Apalodimas

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