From: Kevin Hilman Date: Mon, 15 Dec 2008 23:31:48 +0000 (-0800) Subject: OMAP2/3: SDRC: fix walking of SDRC params list X-Git-Tag: v2.6.28-omap1~60 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c846903b6b94dca5d1b245abcfd5efed4bbbf18a;p=linux-2.6-omap-h63xx.git OMAP2/3: SDRC: fix walking of SDRC params list 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 Acked-by: Paul Walmsley Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/mach-omap2/sdrc.c b/arch/arm/mach-omap2/sdrc.c index 2a30060cb4b..7da65879bcc 100644 --- a/arch/arm/mach-omap2/sdrc.c +++ b/arch/arm/mach-omap2/sdrc.c @@ -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)