mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-17 18:34:42 +00:00
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:
parent
d8dcfeb778
commit
a73b854700
1 changed files with 36 additions and 48 deletions
|
@ -609,14 +609,12 @@ static int test_hii_database_get_package_list_handle(void)
|
||||||
result = EFI_ST_SUCCESS;
|
result = EFI_ST_SUCCESS;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (handle) {
|
ret = hii_database_protocol->remove_package_list(
|
||||||
ret = hii_database_protocol->remove_package_list(
|
hii_database_protocol, handle);
|
||||||
hii_database_protocol, handle);
|
if (ret != EFI_SUCCESS) {
|
||||||
if (ret != EFI_SUCCESS) {
|
efi_st_error("remove_package_list returned %u\n",
|
||||||
efi_st_error("remove_package_list returned %u\n",
|
(unsigned int)ret);
|
||||||
(unsigned int)ret);
|
return EFI_ST_FAILURE;
|
||||||
return EFI_ST_FAILURE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -711,14 +709,12 @@ static int test_hii_string_new_string(void)
|
||||||
result = EFI_ST_SUCCESS;
|
result = EFI_ST_SUCCESS;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (handle) {
|
ret = hii_database_protocol->remove_package_list(
|
||||||
ret = hii_database_protocol->remove_package_list(
|
hii_database_protocol, handle);
|
||||||
hii_database_protocol, handle);
|
if (ret != EFI_SUCCESS) {
|
||||||
if (ret != EFI_SUCCESS) {
|
efi_st_error("remove_package_list returned %u\n",
|
||||||
efi_st_error("remove_package_list returned %u\n",
|
(unsigned int)ret);
|
||||||
(unsigned int)ret);
|
return EFI_ST_FAILURE;
|
||||||
return EFI_ST_FAILURE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -792,14 +788,12 @@ static int test_hii_string_get_string(void)
|
||||||
result = EFI_ST_SUCCESS;
|
result = EFI_ST_SUCCESS;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (handle) {
|
ret = hii_database_protocol->remove_package_list(
|
||||||
ret = hii_database_protocol->remove_package_list(
|
hii_database_protocol, handle);
|
||||||
hii_database_protocol, handle);
|
if (ret != EFI_SUCCESS) {
|
||||||
if (ret != EFI_SUCCESS) {
|
efi_st_error("remove_package_list returned %u\n",
|
||||||
efi_st_error("remove_package_list returned %u\n",
|
(unsigned int)ret);
|
||||||
(unsigned int)ret);
|
return EFI_ST_FAILURE;
|
||||||
return EFI_ST_FAILURE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -851,14 +845,12 @@ static int test_hii_string_set_string(void)
|
||||||
result = EFI_ST_SUCCESS;
|
result = EFI_ST_SUCCESS;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (handle) {
|
ret = hii_database_protocol->remove_package_list(
|
||||||
ret = hii_database_protocol->remove_package_list(
|
hii_database_protocol, handle);
|
||||||
hii_database_protocol, handle);
|
if (ret != EFI_SUCCESS) {
|
||||||
if (ret != EFI_SUCCESS) {
|
efi_st_error("remove_package_list returned %u\n",
|
||||||
efi_st_error("remove_package_list returned %u\n",
|
(unsigned int)ret);
|
||||||
(unsigned int)ret);
|
return EFI_ST_FAILURE;
|
||||||
return EFI_ST_FAILURE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -918,14 +910,12 @@ static int test_hii_string_get_languages(void)
|
||||||
result = EFI_ST_SUCCESS;
|
result = EFI_ST_SUCCESS;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (handle) {
|
ret = hii_database_protocol->remove_package_list(
|
||||||
ret = hii_database_protocol->remove_package_list(
|
hii_database_protocol, handle);
|
||||||
hii_database_protocol, handle);
|
if (ret != EFI_SUCCESS) {
|
||||||
if (ret != EFI_SUCCESS) {
|
efi_st_error("remove_package_list returned %u\n",
|
||||||
efi_st_error("remove_package_list returned %u\n",
|
(unsigned int)ret);
|
||||||
(unsigned int)ret);
|
return EFI_ST_FAILURE;
|
||||||
return EFI_ST_FAILURE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -991,14 +981,12 @@ static int test_hii_string_get_secondary_languages(void)
|
||||||
result = EFI_ST_SUCCESS;
|
result = EFI_ST_SUCCESS;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (handle) {
|
ret = hii_database_protocol->remove_package_list(
|
||||||
ret = hii_database_protocol->remove_package_list(
|
hii_database_protocol, handle);
|
||||||
hii_database_protocol, handle);
|
if (ret != EFI_SUCCESS) {
|
||||||
if (ret != EFI_SUCCESS) {
|
efi_st_error("remove_package_list returned %u\n",
|
||||||
efi_st_error("remove_package_list returned %u\n",
|
(unsigned int)ret);
|
||||||
(unsigned int)ret);
|
return EFI_ST_FAILURE;
|
||||||
return EFI_ST_FAILURE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Add table
Reference in a new issue