From c846903b6b94dca5d1b245abcfd5efed4bbbf18a Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Mon, 15 Dec 2008 15:31:48 -0800 Subject: [PATCH] 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 --- arch/arm/mach-omap2/sdrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.41.1