summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2016-10-29 15:58:39 +0200
committerOlof Johansson <olof@lixom.net>2016-11-07 19:19:35 -0800
commitce3409615244e15c677daeb77f3516224cfc613e (patch)
tree6e086a868b185d6eda3dea3e698d0c16c77fcb93
parenta909d3e636995ba7c349e2ca5dbb528154d4ac30 (diff)
downloadop-kernel-dev-ce3409615244e15c677daeb77f3516224cfc613e.zip
op-kernel-dev-ce3409615244e15c677daeb77f3516224cfc613e.tar.gz
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>
-rw-r--r--arch/arm/mach-spear/time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-spear/time.c b/arch/arm/mach-spear/time.c
index 9ccffc1..4878ba9 100644
--- a/arch/arm/mach-spear/time.c
+++ b/arch/arm/mach-spear/time.c
@@ -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;
}
OpenPOWER on IntegriCloud