From: Christophe JAILLET Date: Sat, 29 Oct 2016 13:58:39 +0000 (+0200) Subject: ARM: spear: Fix error handling X-Git-Tag: v4.10-rc1~86^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce3409615244e15c677daeb77f3516224cfc613e;p=thirdparty%2Flinux.git 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 Signed-off-by: Olof Johansson --- diff --git a/arch/arm/mach-spear/time.c b/arch/arm/mach-spear/time.c index 9ccffc1d0f28d..4878ba90026df 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; }