diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2023-03-29 15:54:26 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-03-30 15:28:56 +0000 |
commit | 883a4c2b22e59f018b789fe6a0e1e52cc0443519 (patch) | |
tree | a7da9c85ef4971ea5855d973a930426b563bc2a5 /src/soc/amd | |
parent | ddf8d19fc245b0230a2715bbf556ee2e8baef404 (diff) |
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>
Diffstat (limited to 'src/soc/amd')
-rw-r--r-- | src/soc/amd/common/block/cpu/noncar/memmap.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/soc/amd/common/block/cpu/noncar/memmap.c b/src/soc/amd/common/block/cpu/noncar/memmap.c index 2661914876..097637ec21 100644 --- a/src/soc/amd/common/block/cpu/noncar/memmap.c +++ b/src/soc/amd/common/block/cpu/noncar/memmap.c @@ -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; } |