diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2020-12-04 00:39:45 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-12-04 00:39:45 +0100 |
commit | fef92cd2bc04c64bb3743d40c0b4be47aedf9e23 (patch) | |
tree | 2a67e73223d40cd16f4b799830b0d13f711ad8b0 /drivers/clocksource/timer-orion.c | |
parent | b996544916429946bf4934c1c01a306d1690972c (diff) | |
parent | ab3105446f1ec4e98fadfc998ee24feec271c16c (diff) |
Merge tag 'timers-v5.11' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core
Pull clocksource/event driver updates from Daniel Lezcano:
- Add static annotation for the sp804 init functions (Zhen Lei)
- Code cleanups and error code path at init time fixes on the sp804
(Kefen Wang)
- Add new OST timer driver device tree bindings (Zhou Yanjie)
- Remove EZChip NPS clocksource driver corresponding to the NPS
platform which was removed from the ARC architecture (Vineet Gupta)
- Add missing clk_disable_unprepare() on error path for Orion (Yang
Yingliang)
- Add device tree bindings documentation for Renesas r8a774e1
(Marian-Cristian Rotariu)
- Convert Renesas TMU to json-schema (Geert Uytterhoeven)
- Fix memory leak on the error path at init time on the cadence_ttc
driver (Yu Kuai)
- Fix section mismatch for Ingenic timer driver (Daniel Lezcano)
- Make RISCV_TIMER depends on RISCV_SBI (Kefeng Wang)
Link: https://lore.kernel.org/r/028084fa-d29b-a1d5-7eab-17f77ef69863@linaro.org
Diffstat (limited to 'drivers/clocksource/timer-orion.c')
-rw-r--r-- | drivers/clocksource/timer-orion.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/clocksource/timer-orion.c b/drivers/clocksource/timer-orion.c index d01ff4181867..5101e834d78f 100644 --- a/drivers/clocksource/timer-orion.c +++ b/drivers/clocksource/timer-orion.c @@ -143,7 +143,8 @@ static int __init orion_timer_init(struct device_node *np) irq = irq_of_parse_and_map(np, 1); if (irq <= 0) { pr_err("%pOFn: unable to parse timer1 irq\n", np); - return -EINVAL; + ret = -EINVAL; + goto out_unprep_clk; } rate = clk_get_rate(clk); @@ -160,7 +161,7 @@ static int __init orion_timer_init(struct device_node *np) clocksource_mmio_readl_down); if (ret) { pr_err("Failed to initialize mmio timer\n"); - return ret; + goto out_unprep_clk; } sched_clock_register(orion_read_sched_clock, 32, rate); @@ -170,7 +171,7 @@ static int __init orion_timer_init(struct device_node *np) "orion_event", NULL); if (ret) { pr_err("%pOFn: unable to setup irq\n", np); - return ret; + goto out_unprep_clk; } ticks_per_jiffy = (clk_get_rate(clk) + HZ/2) / HZ; @@ -183,5 +184,9 @@ static int __init orion_timer_init(struct device_node *np) orion_delay_timer_init(rate); return 0; + +out_unprep_clk: + clk_disable_unprepare(clk); + return ret; } TIMER_OF_DECLARE(orion_timer, "marvell,orion-timer", orion_timer_init); |