RE: [PATCH 02/16] x86/amd_nb: Restrict init function to AMD-based systems

Zhuo, Qiuxu
2024-10-31T08:09:18Z

> From: Yazen Ghannam <yazen.ghannam@amd.com>
> [..]
> --- 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