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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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





[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux