summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-spear
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-08 04:19:35 +0100
commitce3409615244e15c677daeb77f3516224cfc613e (patch)
tree6e086a868b185d6eda3dea3e698d0c16c77fcb93 /arch/arm/mach-spear
parentLinux 4.9-rc3 (diff)
downloadlinux-ce3409615244e15c677daeb77f3516224cfc613e.tar.xz
linux-ce3409615244e15c677daeb77f3516224cfc613e.zip
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>
Diffstat (limited to 'arch/arm/mach-spear')
-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 9ccffc1d0f28..4878ba90026d 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;
}