]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
OMAP2/3: SDRC: fix walking of SDRC params list
authorKevin Hilman <khilman@deeprootsystems.com>
Mon, 15 Dec 2008 23:31:48 +0000 (15:31 -0800)
committerTony Lindgren <tony@atomide.com>
Tue, 16 Dec 2008 00:25:50 +0000 (16:25 -0800)
This patch fixes a bug where omap2_sdrc_get_params() does not properly
check for a valid table entry before continuing.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/sdrc.c

index 2a30060cb4b78ec897bb668b31c665c26c160827..7da65879bccd25a7f2c40a27287cede8f83d9661 100644 (file)
@@ -58,7 +58,7 @@ struct omap_sdrc_params *omap2_sdrc_get_params(unsigned long r)
 
        sp = sdrc_init_params;
 
-       while (sp->rate != r)
+       while (sp->rate && sp->rate != r)
                sp++;
 
        if (!sp->rate)