mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
clocksource/drivers/exynos_mct: Fix error path in timer resources initialization
[ Upstream commitb930742019
] While freeing interrupt handlers in error path, don't assume that all requested interrupts are per-processor interrupts and properly release standard interrupts too. Reported-by: Krzysztof Kozlowski <krzk@kernel.org> Fixes:56a94f1391
("clocksource: exynos_mct: Avoid blocking calls in the cpu hotplug notifier") Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
cc423232fb
commit
ba95507ae3
1 changed files with 13 additions and 1 deletions
|
@ -563,7 +563,19 @@ static int __init exynos4_timer_resources(struct device_node *np, void __iomem *
|
|||
return 0;
|
||||
|
||||
out_irq:
|
||||
free_percpu_irq(mct_irqs[MCT_L0_IRQ], &percpu_mct_tick);
|
||||
if (mct_int_type == MCT_INT_PPI) {
|
||||
free_percpu_irq(mct_irqs[MCT_L0_IRQ], &percpu_mct_tick);
|
||||
} else {
|
||||
for_each_possible_cpu(cpu) {
|
||||
struct mct_clock_event_device *pcpu_mevt =
|
||||
per_cpu_ptr(&percpu_mct_tick, cpu);
|
||||
|
||||
if (pcpu_mevt->evt.irq != -1) {
|
||||
free_irq(pcpu_mevt->evt.irq, pcpu_mevt);
|
||||
pcpu_mevt->evt.irq = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue