aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/sdrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/sdrc.c')
-rw-r--r--arch/arm/mach-omap2/sdrc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/sdrc.c b/arch/arm/mach-omap2/sdrc.c
index d62e4e10d4b..2045441e838 100644
--- a/arch/arm/mach-omap2/sdrc.c
+++ b/arch/arm/mach-omap2/sdrc.c
@@ -60,9 +60,12 @@ struct omap_sdrc_params *omap2_sdrc_get_params(unsigned long r)
{
struct omap_sdrc_params *sp;
+ if (!sdrc_init_params)
+ return NULL;
+
sp = sdrc_init_params;
- while (sp->rate != r)
+ while (sp->rate && sp->rate != r)
sp++;
if (!sp->rate)