Thread (4 messages) flat view 4 messages, 4 authors, 2016-11-08
STALE3559d

[PATCH] ARM: spear: Fix error handling

From: Christophe JAILLET <hidden>
Date: 2016-10-29 13:59:11
Also in: kernel-janitors, lkml
Subsystem: arm port, spear platform/clock/pinctrl support, the rest · Maintainers: Russell King, Viresh Kumar, Linus Torvalds

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

Signed-off-by: Christophe JAILLET <redacted>
---
 arch/arm/mach-spear/time.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
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;
 	}
-- 
2.9.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help