efi_selftest: remove un-needed NULL checks

Because we've already returned early in the event 'handle' is NULL we
don't need these extra not NULL checks. Remove them

Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
Bryan Brattlof 2025-04-08 01:06:58 -05:00 committed by Heinrich Schuchardt
parent d8dcfeb778
commit a73b854700

View file

@ -609,7 +609,6 @@ static int test_hii_database_get_package_list_handle(void)
result = EFI_ST_SUCCESS;
out:
if (handle) {
ret = hii_database_protocol->remove_package_list(
hii_database_protocol, handle);
if (ret != EFI_SUCCESS) {
@ -617,7 +616,6 @@ out:
(unsigned int)ret);
return EFI_ST_FAILURE;
}
}
return result;
}
@ -711,7 +709,6 @@ static int test_hii_string_new_string(void)
result = EFI_ST_SUCCESS;
out:
if (handle) {
ret = hii_database_protocol->remove_package_list(
hii_database_protocol, handle);
if (ret != EFI_SUCCESS) {
@ -719,7 +716,6 @@ out:
(unsigned int)ret);
return EFI_ST_FAILURE;
}
}
return result;
}
@ -792,7 +788,6 @@ static int test_hii_string_get_string(void)
result = EFI_ST_SUCCESS;
out:
if (handle) {
ret = hii_database_protocol->remove_package_list(
hii_database_protocol, handle);
if (ret != EFI_SUCCESS) {
@ -800,7 +795,6 @@ out:
(unsigned int)ret);
return EFI_ST_FAILURE;
}
}
return result;
}
@ -851,7 +845,6 @@ static int test_hii_string_set_string(void)
result = EFI_ST_SUCCESS;
out:
if (handle) {
ret = hii_database_protocol->remove_package_list(
hii_database_protocol, handle);
if (ret != EFI_SUCCESS) {
@ -859,7 +852,6 @@ out:
(unsigned int)ret);
return EFI_ST_FAILURE;
}
}
return result;
}
@ -918,7 +910,6 @@ static int test_hii_string_get_languages(void)
result = EFI_ST_SUCCESS;
out:
if (handle) {
ret = hii_database_protocol->remove_package_list(
hii_database_protocol, handle);
if (ret != EFI_SUCCESS) {
@ -926,7 +917,6 @@ out:
(unsigned int)ret);
return EFI_ST_FAILURE;
}
}
return result;
}
@ -991,7 +981,6 @@ static int test_hii_string_get_secondary_languages(void)
result = EFI_ST_SUCCESS;
out:
if (handle) {
ret = hii_database_protocol->remove_package_list(
hii_database_protocol, handle);
if (ret != EFI_SUCCESS) {
@ -999,7 +988,6 @@ out:
(unsigned int)ret);
return EFI_ST_FAILURE;
}
}
return result;
}