diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2019-07-22 15:17:40 +0200 |
---|---|---|
committer | Sekhar Nori <nsekhar@ti.com> | 2019-08-07 20:52:48 +0200 |
commit | d470df3bc5e1a9cd38995b55c918d9ecdda141e1 (patch) | |
tree | 1250f48f0a7e9a4e6a4bc7d90fc6987e39bc844f /arch/arm/mach-davinci/da830.c | |
parent | ARM: davinci: enable the clocksource driver for DT mode (diff) | |
download | linux-d470df3bc5e1a9cd38995b55c918d9ecdda141e1.tar.xz linux-d470df3bc5e1a9cd38995b55c918d9ecdda141e1.zip |
ARM: davinci: WARN_ON() if clk_get() fails
Currently the timer code checks if the clock pointer passed to it is
good (!IS_ERR(clk)). The new clocksource driver expects the clock to
be functional and doesn't perform any checks so emit a warning if
clk_get() fails. Apply this to all davinci platforms.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: David Lechner <david@lechnology.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'arch/arm/mach-davinci/da830.c')
-rw-r--r-- | arch/arm/mach-davinci/da830.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c index e6b8ffd934a1..220e99438ae0 100644 --- a/arch/arm/mach-davinci/da830.c +++ b/arch/arm/mach-davinci/da830.c @@ -751,6 +751,10 @@ void __init da830_init_time(void) da830_pll_init(NULL, pll, NULL); clk = clk_get(NULL, "timer0"); + if (WARN_ON(IS_ERR(clk))) { + pr_err("Unable to get the timer clock\n"); + return; + } davinci_timer_init(clk); } |