Commit cb9675f3 authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by Tony Lindgren

arm: plat-omap: counter_32k: use IS_ERR() instead of NULL check

clk_get() returns ERR_PTR() on error, not NULL.
Signed-off-by: default avatarVasiliy Kulikov <segoon@openwall.com>
Acked-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
[tony@atomide.com: updated to include err.h to compile on omap1]
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 859158bf
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/err.h>
#include <plat/common.h> #include <plat/common.h>
#include <plat/board.h> #include <plat/board.h>
...@@ -164,7 +165,7 @@ static int __init omap_init_clocksource_32k(void) ...@@ -164,7 +165,7 @@ static int __init omap_init_clocksource_32k(void)
return -ENODEV; return -ENODEV;
sync_32k_ick = clk_get(NULL, "omap_32ksync_ick"); sync_32k_ick = clk_get(NULL, "omap_32ksync_ick");
if (sync_32k_ick) if (!IS_ERR(sync_32k_ick))
clk_enable(sync_32k_ick); clk_enable(sync_32k_ick);
clocksource_32k.mult = clocksource_hz2mult(32768, clocksource_32k.mult = clocksource_hz2mult(32768,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment