From: Vasiliy Kulikov Date: Fri, 26 Nov 2010 17:06:02 +0000 (+0000) Subject: arm: plat-omap: counter_32k: use IS_ERR() instead of NULL check X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~23801^2~4 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=cb9675f3282f5565cc9e3698cc847355c1194871;p=mirror_ubuntu-focal-kernel.git arm: plat-omap: counter_32k: use IS_ERR() instead of NULL check clk_get() returns ERR_PTR() on error, not NULL. Signed-off-by: Vasiliy Kulikov Acked-by: Kevin Hilman [tony@atomide.com: updated to include err.h to compile on omap1] Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c index 155fe43a672b..8722a136f3a5 100644 --- a/arch/arm/plat-omap/counter_32k.c +++ b/arch/arm/plat-omap/counter_32k.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -164,7 +165,7 @@ static int __init omap_init_clocksource_32k(void) return -ENODEV; sync_32k_ick = clk_get(NULL, "omap_32ksync_ick"); - if (sync_32k_ick) + if (!IS_ERR(sync_32k_ick)) clk_enable(sync_32k_ick); clocksource_32k.mult = clocksource_hz2mult(32768,