]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
ARM: spear: Fix error handling
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 29 Oct 2016 13:58:39 +0000 (15:58 +0200)
committerOlof Johansson <olof@lixom.net>
Tue, 8 Nov 2016 03:19:35 +0000 (19:19 -0800)
'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>
arch/arm/mach-spear/time.c

index 9ccffc1d0f28dd43edbb8649ffd8fdd3c6e51431..4878ba90026df68bb0d06683df795c94ee20d7ec 100644 (file)
@@ -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;
        }