summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/sdram-nokia.c
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@nokia.com>2010-12-18 00:13:46 +0100
committerTony Lindgren <tony@atomide.com>2010-12-18 00:13:46 +0100
commit2b1af87ace4776f0d0c3513923a79529fc1b5a00 (patch)
treee044569840947787d9fd608419264fda6a4a728d /arch/arm/mach-omap2/sdram-nokia.c
parentarm: omap: sdram-nokia: use array to list timings (diff)
downloadlinux-2b1af87ace4776f0d0c3513923a79529fc1b5a00.tar.xz
linux-2b1af87ace4776f0d0c3513923a79529fc1b5a00.zip
arm: omap: sdram-nokia: improve error handling
Actually check for errors: print an error log and return NULL. Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/sdram-nokia.c')
-rw-r--r--arch/arm/mach-omap2/sdram-nokia.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/sdram-nokia.c b/arch/arm/mach-omap2/sdram-nokia.c
index 1171451ef7f2..863586bdb98a 100644
--- a/arch/arm/mach-omap2/sdram-nokia.c
+++ b/arch/arm/mach-omap2/sdram-nokia.c
@@ -223,10 +223,14 @@ struct omap_sdrc_params *nokia_get_sdram_timings(void)
int err = 0;
int i;
- for (i = 0; i < ARRAY_SIZE(nokia_timings); i++)
+ for (i = 0; i < ARRAY_SIZE(nokia_timings); i++) {
err |= sdrc_timings(i, nokia_timings[i].rate,
nokia_timings[i].data);
+ if (err)
+ pr_err("%s: error with rate %ld: %d\n", __func__,
+ nokia_timings[i].rate, err);
+ }
- return &nokia_sdrc_params[0];
+ return err ? NULL : nokia_sdrc_params;
}