[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251006-wip-atl-prm-v1-3-4a62967fb2b0@amd.com>
Date: Mon, 6 Oct 2025 15:10:27 +0000
From: Yazen Ghannam <yazen.ghannam@....com>
To: "Rafael J. Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>,
Yazen Ghannam <Yazen.Ghannam@....com>, Tony Luck <tony.luck@...el.com>,
Borislav Petkov <bp@...en8.de>
CC: <linux-acpi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-edac@...r.kernel.org>, Avadhut Naik <avadhut.naik@....com>, John Allen
<john.allen@....com>, Mario Limonciello <mario.limonciello@....com>, "Yazen
Ghannam" <yazen.ghannam@....com>
Subject: [PATCH 3/3] RAS/AMD/ATL: Return error codes from helper functions
Pass up error codes from helper functions rather than discarding them.
Suggested-by: Mario Limonciello <mario.limonciello@....com>
Signed-off-by: Yazen Ghannam <yazen.ghannam@....com>
---
drivers/ras/amd/atl/core.c | 7 +++++--
drivers/ras/amd/atl/system.c | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/ras/amd/atl/core.c b/drivers/ras/amd/atl/core.c
index 4197e10993ac..0f7cd6dab0b0 100644
--- a/drivers/ras/amd/atl/core.c
+++ b/drivers/ras/amd/atl/core.c
@@ -194,6 +194,8 @@ MODULE_DEVICE_TABLE(x86cpu, amd_atl_cpuids);
static int __init amd_atl_init(void)
{
+ int ret;
+
if (!x86_match_cpu(amd_atl_cpuids))
return -ENODEV;
@@ -202,8 +204,9 @@ static int __init amd_atl_init(void)
check_for_legacy_df_access();
- if (get_df_system_info())
- return -ENODEV;
+ ret = get_df_system_info();
+ if (ret)
+ return ret;
/* Increment this module's recount so that it can't be easily unloaded. */
__module_get(THIS_MODULE);
diff --git a/drivers/ras/amd/atl/system.c b/drivers/ras/amd/atl/system.c
index 09664b0ff8a6..13c89ef2c487 100644
--- a/drivers/ras/amd/atl/system.c
+++ b/drivers/ras/amd/atl/system.c
@@ -285,10 +285,13 @@ static void dump_df_cfg(void)
int get_df_system_info(void)
{
- if (determine_df_rev()) {
+ int ret;
+
+ ret = determine_df_rev();
+ if (ret) {
pr_warn("Failed to determine DF Revision");
df_cfg.rev = UNKNOWN;
- return -EINVAL;
+ return ret;
}
if (df_cfg.flags.prm_only)
--
2.51.0
Powered by blists - more mailing lists