From: Borislav Petkov Date: Fri, 21 May 2010 19:25:03 +0000 (+0200) Subject: amd64_edac: Correct scrub rate setting X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bc57117856cf1e581135810b37d3b75f9d1749f5;p=mv-sheeva.git amd64_edac: Correct scrub rate setting Exit early when setting scrub rate on unknown/unsupported families. Cc: # 32.x 33.x 34.x Signed-off-by: Borislav Petkov Acked-by: Doug Thompson --- diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 4129aa0930c..cdf457925f0 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -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);