[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210507190140.18854-11-Yazen.Ghannam@amd.com>
Date: Fri, 7 May 2021 15:01:25 -0400
From: Yazen Ghannam <Yazen.Ghannam@....com>
To: linux-edac@...r.kernel.org
Cc: Yazen Ghannam <Yazen.Ghannam@....com>,
linux-kernel@...r.kernel.org, tony.luck@...el.com, x86@...nel.org,
Smita.KoralahalliChannabasappa@....com
Subject: [PATCH 10/25] x86/MCE/AMD: Remove goto statements
From: Yazen Ghannam <yazen.ghannam@....com>
...and just return error codes directly.
Signed-off-by: Yazen Ghannam <yazen.ghannam@....com>
---
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
Powered by blists - more mailing lists