diff options
author | Chuhong Yuan <hslester96@gmail.com> | 2019-10-16 14:43:30 +0200 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2019-11-04 10:40:10 +0100 |
commit | 6e001f6a4cc73cd06fc7b8c633bc4906c33dd8ad (patch) | |
tree | cbfab898cbde8fd3425008a1b71799591500e62c /drivers/clocksource | |
parent | clocksource/drivers/renesas-ostm: Use unique device name instead of ostm (diff) | |
download | linux-6e001f6a4cc73cd06fc7b8c633bc4906c33dd8ad.tar.xz linux-6e001f6a4cc73cd06fc7b8c633bc4906c33dd8ad.zip |
clocksource/drivers/asm9260: Add a check for of_clk_get
asm9260_timer_init misses a check for of_clk_get.
Add a check for it and print errors like other clocksource drivers.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20191016124330.22211-1-hslester96@gmail.com
Diffstat (limited to 'drivers/clocksource')
-rw-r--r-- | drivers/clocksource/asm9260_timer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/clocksource/asm9260_timer.c b/drivers/clocksource/asm9260_timer.c index 9f09a59161e7..5b39d3701fa3 100644 --- a/drivers/clocksource/asm9260_timer.c +++ b/drivers/clocksource/asm9260_timer.c @@ -194,6 +194,10 @@ static int __init asm9260_timer_init(struct device_node *np) } clk = of_clk_get(np, 0); + if (IS_ERR(clk)) { + pr_err("Failed to get clk!\n"); + return PTR_ERR(clk); + } ret = clk_prepare_enable(clk); if (ret) { |