From 8fb16fee96a1563738e7fa784fc45d152b8c2694 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Sun, 2 Jan 2022 14:37:32 +0100 Subject: [PATCH] boot: Do not warn if an initializing driver returns EFI_ABORTED Fixes: #21965 --- src/boot/efi/drivers.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/boot/efi/drivers.c b/src/boot/efi/drivers.c index ce5cf3dcd7..61df20e24a 100644 --- a/src/boot/efi/drivers.c +++ b/src/boot/efi/drivers.c @@ -43,8 +43,13 @@ static EFI_STATUS load_one_driver( return log_error_status_stall(EFI_INVALID_PARAMETER, L"Image %s is not a driver, refusing: %r", fname); err = BS->StartImage(image, NULL, NULL); - if (EFI_ERROR(err)) - return log_error_status_stall(err, L"Failed to start image %s: %r", fname, err); + if (EFI_ERROR(err)) { + /* EFI_ABORTED signals an initializing driver. It uses this error code on success + * so that it is unloaded after. */ + if (err != EFI_ABORTED) + log_error_stall(L"Failed to start image %s: %r", fname, err); + return err; + } TAKE_PTR(image); return EFI_SUCCESS;