]> git.sur5r.net Git - u-boot/blobdiff - lib/efi_driver/efi_uclass.c
efi: sandbox: Add required linker sections
[u-boot] / lib / efi_driver / efi_uclass.c
index 90797f96d8d26e5ff8fc17d770ea9821cdae0709..b484aba072fae125fc0bcf435762cd3109294b61 100644 (file)
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  *  Uclass for EFI drivers
  *
  *  Copyright (c) 2017 Heinrich Schuchardt
  *
- *  SPDX-License-Identifier:     GPL-2.0+
- *
  * For each EFI driver the uclass
  * - creates a handle
  * - installs the driver binding protocol
@@ -287,10 +286,10 @@ out:
  *
  * @return     0 = success, any other value will stop further execution
  */
-int efi_driver_init(void)
+efi_status_t efi_driver_init(void)
 {
        struct driver *drv;
-       int ret = 0;
+       efi_status_t ret = EFI_SUCCESS;
 
        /* Save 'gd' pointer */
        efi_save_gd();
@@ -300,7 +299,7 @@ int efi_driver_init(void)
             drv < ll_entry_end(struct driver, driver); ++drv) {
                if (drv->id == UCLASS_EFI) {
                        ret = efi_add_driver(drv);
-                       if (ret) {
+                       if (ret != EFI_SUCCESS) {
                                printf("EFI: ERROR: failed to add driver %s\n",
                                       drv->name);
                                break;