[PATCH v2 14/31] EDAC/amd64: Remove goto statements
From: Yazen Ghannam
Date: Wed Jun 23 2021 - 15:22:11 EST
...and just return error codes directly.
Signed-off-by: Yazen Ghannam <yazen.ghannam@xxxxxxx>
---
Link:
https://lkml.kernel.org/r/20210507190140.18854-11-Yazen.Ghannam@xxxxxxx
v1->v2:
* Moved from arch/x86 to EDAC.
drivers/edac/amd64_edac.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index de80a224ef12..3f1ff5adce4a 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -1390,28 +1390,25 @@ static 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 (df_ops->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 (ctx.dehash_addr && ctx.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;
}
static int get_channel_from_ecc_syndrome(struct mem_ctl_info *, u16);
--
2.25.1