diff options
author | Aaro Koskinen <aaro.koskinen@nokia.com> | 2010-12-17 18:13:46 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-12-17 18:13:46 -0500 |
commit | 2b1af87ace4776f0d0c3513923a79529fc1b5a00 (patch) | |
tree | e044569840947787d9fd608419264fda6a4a728d | |
parent | e5f5b5422d064b7a393e39332da31af68e975f91 (diff) |
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>
-rw-r--r-- | arch/arm/mach-omap2/sdram-nokia.c | 8 |
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) | |||
223 | int err = 0; | 223 | int err = 0; |
224 | int i; | 224 | int i; |
225 | 225 | ||
226 | for (i = 0; i < ARRAY_SIZE(nokia_timings); i++) | 226 | for (i = 0; i < ARRAY_SIZE(nokia_timings); i++) { |
227 | err |= sdrc_timings(i, nokia_timings[i].rate, | 227 | err |= sdrc_timings(i, nokia_timings[i].rate, |
228 | nokia_timings[i].data); | 228 | nokia_timings[i].data); |
229 | if (err) | ||
230 | pr_err("%s: error with rate %ld: %d\n", __func__, | ||
231 | nokia_timings[i].rate, err); | ||
232 | } | ||
229 | 233 | ||
230 | return &nokia_sdrc_params[0]; | 234 | return err ? NULL : nokia_sdrc_params; |
231 | } | 235 | } |
232 | 236 | ||