]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/sdrc.c
SDRC: prevent null pointer dereference if sdrc_init_params is null
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / sdrc.c
index 7da65879bccd25a7f2c40a27287cede8f83d9661..993fd253cb9cb4bca12e7348210e1715ed6b9d67 100644 (file)
@@ -56,6 +56,9 @@ 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 && sp->rate != r)