ARM: spear: Fix error handling

'clk_get_sys()' returns an error pointer in case of error, not NULL. So
test it with IS_ERR.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Olof Johansson <olof@lixom.net>
此提交包含在:
Christophe JAILLET
2016-10-29 15:58:39 +02:00
提交者 Olof Johansson
父節點 a909d3e636
當前提交 ce34096152

查看文件

@@ -233,7 +233,7 @@ void __init spear_setup_of_timer(void)
}
gpt_clk = clk_get_sys("gpt0", NULL);
if (!gpt_clk) {
if (IS_ERR(gpt_clk)) {
pr_err("%s:couldn't get clk for gpt\n", __func__);
goto err_iomap;
}