RE: [PATCH 02/16] x86/amd_nb: Restrict init function to AMD-based systems
From: Zhuo, Qiuxu
Date: Thu Oct 31 2024 - 04:09:32 EST
> From: Yazen Ghannam <yazen.ghannam@xxxxxxx>
> [..]
> --- a/arch/x86/kernel/amd_nb.c
> +++ b/arch/x86/kernel/amd_nb.c
> @@ -582,6 +582,10 @@ static __init void fix_erratum_688(void)
>
> static __init int init_amd_nbs(void)
> {
> + if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD &&
> + boot_cpu_data.x86_vendor != X86_VENDOR_HYGON)
> + return 0;
> +
> amd_cache_northbridges();
This function could fail and return an error.
Is an early return with an error code needed if this function fails?
[ I know this is out of this patch scope. ]
> amd_cache_gart();
-Qiuxu