Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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@amd.com>
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>

authored by

Yazen Ghannam and committed by
Borislav Petkov (AMD)
6553c68b 3a866087

+10 -4
+5 -2
drivers/ras/amd/atl/core.c
··· 194 194 195 195 static int __init amd_atl_init(void) 196 196 { 197 + int ret; 198 + 197 199 if (!x86_match_cpu(amd_atl_cpuids)) 198 200 return -ENODEV; 199 201 ··· 204 202 205 203 check_for_legacy_df_access(); 206 204 207 - if (get_df_system_info()) 208 - return -ENODEV; 205 + ret = get_df_system_info(); 206 + if (ret) 207 + return ret; 209 208 210 209 /* Increment this module's recount so that it can't be easily unloaded. */ 211 210 __module_get(THIS_MODULE);
+5 -2
drivers/ras/amd/atl/system.c
··· 288 288 289 289 int get_df_system_info(void) 290 290 { 291 - if (determine_df_rev()) { 291 + int ret; 292 + 293 + ret = determine_df_rev(); 294 + if (ret) { 292 295 pr_warn("Failed to determine DF Revision"); 293 296 df_cfg.rev = UNKNOWN; 294 - return -EINVAL; 297 + return ret; 295 298 } 296 299 297 300 apply_node_id_shift();