diff options
author | Borislav Petkov <bp@suse.de> | 2016-06-16 01:13:18 +0200 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2016-06-16 01:13:18 +0200 |
commit | 6ba92fea1b6cf9969398df918157974ae8faa068 (patch) | |
tree | d53c19f374197c2bb7f611f4e8e22803822d8312 /drivers/edac/amd64_edac.c | |
parent | ab564cb51ee60e845f65998491a703adbae52305 (diff) | |
download | linux-6ba92fea1b6cf9969398df918157974ae8faa068.tar.bz2 |
EDAC, amd64_edac: Init opstate at the proper time during init
It is useless to do it if we're loaded on unsupported hardware so do
that only after we have detected at least 1 supported AMD northbridge.
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac/amd64_edac.c')
-rw-r--r-- | drivers/edac/amd64_edac.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 46784eb2edc6..8c0ec2128907 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -2966,11 +2966,11 @@ static int __init amd64_edac_init(void) int err = -ENODEV; int i; - opstate_init(); - if (amd_cache_northbridges() < 0) goto err_ret; + opstate_init(); + err = -ENOMEM; ecc_stngs = kzalloc(amd_nb_num() * sizeof(ecc_stngs[0]), GFP_KERNEL); if (!ecc_stngs) |