]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[efi] Return success from Stop() if driver is already stopped
authorMichael Brown <mcb30@ipxe.org>
Sat, 29 Mar 2025 18:41:01 +0000 (18:41 +0000)
committerMichael Brown <mcb30@ipxe.org>
Sat, 29 Mar 2025 18:44:34 +0000 (18:44 +0000)
Return success if asked to stop driving a device that we are not
currently driving.  This avoids propagating spurious errors to an
external caller of DisconnectController().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/interface/efi/efi_driver.c

index 56918deba91a50d4f6430ab6c1965dcb1b395b8d..5e8d253f0c50b7cd5c48666b57f50b3986a4820a 100644 (file)
@@ -307,7 +307,7 @@ efi_driver_stop ( EFI_DRIVER_BINDING_PROTOCOL *driver __unused,
        if ( ! efidev ) {
                DBGCP ( device, "EFIDRV %s is not started\n",
                        efi_handle_name ( device ) );
-               return EFI_DEVICE_ERROR;
+               return 0;
        }
 
        /* Raise TPL */