Skip to contentSkip to conversation

OMAP2/3: SDRC: fix walking of SDRC params list

PATCH In review Kevin Hilman 3 participants 3 messages Dec 15, 2008 – Dec 16, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 arch/arm/mach-omap2/sdrc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/sdrc.c +1 -1
index 2a30060..7da6587 100644
@@ -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)
Signature · 1 line
1.6.0.3