soc/amd/common/block/cpu/noncar/memmap: simplify return value check

Since the return value of the fsp_find_range_hob call is only used in
one location, move the call and return value check into the if condition
block to not need the status variable.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I4b9e9251368b86382dc4e050cf176db79dbfb230
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74081
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
This commit is contained in:
Felix Held 2023-03-29 15:54:26 +02:00
parent ddf8d19fc2
commit 883a4c2b22
1 changed files with 1 additions and 3 deletions

View File

@ -38,7 +38,6 @@ void smm_region(uintptr_t *start, size_t *size)
static int once;
static uintptr_t smm_start;
static size_t smm_size;
int status;
*start = smm_start;
*size = smm_size;
@ -46,9 +45,8 @@ void smm_region(uintptr_t *start, size_t *size)
return;
struct range_entry tseg;
status = fsp_find_range_hob(&tseg, AMD_FSP_TSEG_HOB_GUID.b);
if (status < 0) {
if (fsp_find_range_hob(&tseg, AMD_FSP_TSEG_HOB_GUID.b) < 0) {
printk(BIOS_ERR, "unable to find TSEG HOB\n");
return;
}