]> 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 17:20:38 +0000 (10:20 -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 1c220dc62d89aa840ea4b0c8f09fff68f005886b..2aa339e94968e5294cb22e2a570719d82639f18a 100644 (file)
@@ -156,7 +156,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);