[PATCH 10/25] x86/MCE/AMD: Remove goto statements
From: Yazen Ghannam
Date: Fri May 07 2021 - 15:02:23 EST
From: Yazen Ghannam <yazen.ghannam@xxxxxxx>
...and just return error codes directly.
Signed-off-by: Yazen Ghannam <yazen.ghannam@xxxxxxx>
---
arch/x86/kernel/cpu/mce/amd.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c
index 7aaf8a1dce2b..d51ec5c2f319 100644
--- a/arch/x86/kernel/cpu/mce/amd.c
+++ b/arch/x86/kernel/cpu/mce/amd.c
@@ -1015,28 +1015,25 @@ int umc_normaddr_to_sysaddr(u64 norm_addr, u16 nid, u8 umc, u64 *sys_addr)
return -EINVAL;
if (get_dram_addr_map(&ctx))
- goto out_err;
+ return -EINVAL;
if (get_intlv_mode(&ctx))
- goto out_err;
+ return -EINVAL;
if (denormalize_addr(&ctx))
- goto out_err;
+ return -EINVAL;
if (add_base_and_hole(&ctx))
- goto out_err;
+ return -EINVAL;
if (dehash_addr(&ctx))
- goto out_err;
+ return -EINVAL;
if (addr_over_limit(&ctx))
- goto out_err;
+ return -EINVAL;
*sys_addr = ctx.ret_addr;
return 0;
-
-out_err:
- return -EINVAL;
}
EXPORT_SYMBOL_GPL(umc_normaddr_to_sysaddr);
--
2.25.1