]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
amd64_edac: Correct scrub rate setting
authorBorislav Petkov <borislav.petkov@amd.com>
Fri, 21 May 2010 19:25:03 +0000 (21:25 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Aug 2010 18:09:14 +0000 (11:09 -0700)
commit bc57117856cf1e581135810b37d3b75f9d1749f5 upstream.

Exit early when setting scrub rate on unknown/unsupported families.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Acked-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/edac/amd64_edac.c

index 5d9e03269ea209a9ea240cfecbbcb7be4653c877..c028acbca76832127a7d039a366d9701e21df302 100644 (file)
@@ -178,7 +178,7 @@ static int amd64_set_scrub_rate(struct mem_ctl_info *mci, u32 *bandwidth)
 
        default:
                amd64_printk(KERN_ERR, "Unsupported family!\n");
-               break;
+               return -EINVAL;
        }
        return amd64_search_set_scrub_rate(pvt->misc_f3_ctl, *bandwidth,
                        min_scrubrate);