EDAC, amd64: Add x86cpuid sanity check during init
authorYazen Ghannam <Yazen.Ghannam@amd.com>
Fri, 27 Jan 2017 17:24:23 +0000 (11:24 -0600)
committerBorislav Petkov <bp@suse.de>
Sat, 28 Jan 2017 13:43:06 +0000 (14:43 +0100)
commit1bd9900b8301fc505f032c90ea487824cf824e99
treecd96515d589f7ac639264ad40a3837320ae41bd9
parent4688c9b42dd2040673a1c2208a1008822b07ee4a
EDAC, amd64: Add x86cpuid sanity check during init

Match one of the devices in amd64_cpuids[] before loading the module.
This is an additional sanity check against users trying to load
amd64_edac_mod on unsupported systems.

Signed-off-by: Yazen Ghannam <Yazen.Ghannam@amd.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1485537863-2707-9-git-send-email-Yazen.Ghannam@amd.com
[ Get rid of err_ret label, make it a bit more readable this way. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
drivers/edac/amd64_edac.c
drivers/edac/amd64_edac.h