efi_selftest: remove todo in device path test
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 11 Jan 2018 07:16:07 +0000 (08:16 +0100)
committerAlexander Graf <agraf@suse.de>
Mon, 22 Jan 2018 22:09:13 +0000 (23:09 +0100)
The installation of UninstallProtocol is functional now.
So we do not expect errors when calling it.

Call UninstallProtocol with correct level of indirection
for parameter handle.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
lib/efi_selftest/efi_selftest_devicepath.c

index d9a669789243ddd8d023a2b17b24a75e422ab362..2f8f3c7f15e44ac18dcb2316dc53522170a9064b 100644 (file)
@@ -192,31 +192,41 @@ static int teardown(void)
 {
        efi_status_t ret;
 
-       ret = boottime->uninstall_protocol_interface(&handle1,
+       ret = boottime->uninstall_protocol_interface(handle1,
                                                     &guid_device_path,
                                                     dp1);
-       if (ret != EFI_SUCCESS)
-               efi_st_todo("UninstallProtocolInterface failed\n");
-       ret = boottime->uninstall_protocol_interface(&handle1,
+       if (ret != EFI_SUCCESS) {
+               efi_st_error("UninstallProtocolInterface failed\n");
+               return EFI_ST_FAILURE;
+       }
+       ret = boottime->uninstall_protocol_interface(handle1,
                                                     &guid_protocol,
                                                     &interface);
-       if (ret != EFI_SUCCESS)
-               efi_st_todo("UninstallProtocolInterface failed\n");
-       ret = boottime->uninstall_protocol_interface(&handle2,
+       if (ret != EFI_SUCCESS) {
+               efi_st_error("UninstallProtocolInterface failed\n");
+               return EFI_ST_FAILURE;
+       }
+       ret = boottime->uninstall_protocol_interface(handle2,
                                                     &guid_device_path,
                                                     dp2);
-       if (ret != EFI_SUCCESS)
-               efi_st_todo("UninstallProtocolInterface failed\n");
-       ret = boottime->uninstall_protocol_interface(&handle2,
+       if (ret != EFI_SUCCESS) {
+               efi_st_error("UninstallProtocolInterface failed\n");
+               return EFI_ST_FAILURE;
+       }
+       ret = boottime->uninstall_protocol_interface(handle2,
                                                     &guid_protocol,
                                                     &interface);
-       if (ret != EFI_SUCCESS)
-               efi_st_todo("UninstallProtocolInterface failed\n");
-       ret = boottime->uninstall_protocol_interface(&handle3,
+       if (ret != EFI_SUCCESS) {
+               efi_st_error("UninstallProtocolInterface failed\n");
+               return EFI_ST_FAILURE;
+       }
+       ret = boottime->uninstall_protocol_interface(handle3,
                                                     &guid_device_path,
                                                     dp3);
-       if (ret != EFI_SUCCESS)
-               efi_st_todo("UninstallProtocolInterface failed\n");
+       if (ret != EFI_SUCCESS) {
+               efi_st_error("UninstallProtocolInterface failed\n");
+               return EFI_ST_FAILURE;
+       }
        if (dp1) {
                ret = boottime->free_pool(dp1);
                if (ret != EFI_SUCCESS) {