diff options
author | Vasiliy Kulikov <segoon@openwall.com> | 2010-11-26 12:06:02 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-12-06 19:00:16 -0500 |
commit | cb9675f3282f5565cc9e3698cc847355c1194871 (patch) | |
tree | aca9ebc287f368f1497de2aa040fbabc6e5c46d1 /arch/arm/plat-omap/counter_32k.c | |
parent | 859158bfab7e72af440622fb9731bcaef4e7d6dc (diff) |
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 <segoon@openwall.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
[tony@atomide.com: updated to include err.h to compile on omap1]
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/counter_32k.c')
-rw-r--r-- | arch/arm/plat-omap/counter_32k.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/err.h> | ||
19 | 20 | ||
20 | #include <plat/common.h> | 21 | #include <plat/common.h> |
21 | #include <plat/board.h> | 22 | #include <plat/board.h> |
@@ -164,7 +165,7 @@ static int __init omap_init_clocksource_32k(void) | |||
164 | return -ENODEV; | 165 | return -ENODEV; |
165 | 166 | ||
166 | sync_32k_ick = clk_get(NULL, "omap_32ksync_ick"); | 167 | sync_32k_ick = clk_get(NULL, "omap_32ksync_ick"); |
167 | if (sync_32k_ick) | 168 | if (!IS_ERR(sync_32k_ick)) |
168 | clk_enable(sync_32k_ick); | 169 | clk_enable(sync_32k_ick); |
169 | 170 | ||
170 | clocksource_32k.mult = clocksource_hz2mult(32768, | 171 | clocksource_32k.mult = clocksource_hz2mult(32768, |