All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: spear: Fix error handling
@ 2016-10-29 13:58 ` Christophe JAILLET
  0 siblings, 0 replies; 12+ messages in thread
From: Christophe JAILLET @ 2016-10-29 13:58 UTC (permalink / raw)
  To: linux-arm-kernel

'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>
---
 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


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-11-08  1:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-29 13:58 [PATCH] ARM: spear: Fix error handling Christophe JAILLET
2016-10-29 13:58 ` Christophe JAILLET
2016-10-29 13:58 ` Christophe JAILLET
2016-10-31 16:18 ` Russell King - ARM Linux
2016-10-31 16:18   ` Russell King - ARM Linux
2016-10-31 16:18   ` Russell King - ARM Linux
2016-11-02  2:25 ` Viresh Kumar
2016-11-02  2:37   ` Viresh Kumar
2016-11-02  2:25   ` Viresh Kumar
2016-11-07 21:16 ` Olof Johansson
2016-11-07 21:16   ` Olof Johansson
2016-11-07 21:16   ` Olof Johansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.