提交 2b1af87a 编写于 作者: A Aaro Koskinen 提交者: Tony Lindgren

arm: omap: sdram-nokia: improve error handling

Actually check for errors: print an error log and return NULL.
Signed-off-by: NAaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: NTony Lindgren <tony@atomide.com>
上级 e5f5b542
......@@ -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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册