linux/drivers/clocksource
Sergei Shtylyov 32f2fea6e7 clocksource/drivers/timer-of: Handle of_irq_get_byname() result correctly
of_irq_get_byname() may return a negative error number as well as 0 on
failure, while timer_irq_init() only checks for 0, blithely continuing with
the call to request_[percpu_]irq() -- those functions expect *unsigned int*,
so would probably fail anyway when a large IRQ number resulting from a
conversion of a negative error number is passed to them... This, however,
is incorrect behavior -- error number is not IRQ number.

Filter out the negative error numbers, complain, and return them to the
timer_irq_init()'s callers...

Fixes: dc11bae785 ("clocksource/drivers: Add timer-of common init routine")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: http://lkml.kernel.org/r/20170717180114.678825147@cogentembedded.com
2017-07-17 22:43:00 +02:00
..
acpi_pm.c
arc_timer.c
arm_arch_timer.c Merge branch 'timers/urgent' into timers/core 2017-06-21 09:07:52 +02:00
arm_global_timer.c
armv7m_systick.c
asm9260_timer.c
bcm2835_timer.c
bcm_kona_timer.c
cadence_ttc_timer.c Merge branch 'timers/urgent' into timers/core 2017-06-21 09:07:52 +02:00
clksrc_st_lpc.c
clksrc-dbx500-prcmu.c
clps711x-timer.c clocksource/drivers: Rename CLKSRC_OF to TIMER_OF 2017-06-14 12:01:03 +02:00
cs5535-clockevt.c
dummy_timer.c
dw_apb_timer_of.c
dw_apb_timer.c
em_sti.c
exynos_mct.c
fsl_ftm_timer.c clocksource/drivers/fsl_ftm_timer: Unmap region obtained by of_iomap 2017-06-27 11:25:39 +02:00
h8300_timer8.c
h8300_timer16.c
h8300_tpu.c
i8253.c
jcore-pit.c
Kconfig ARM: SoC driver updates 2017-07-04 14:47:47 -07:00
Makefile ARM: SoC driver updates 2017-07-04 14:47:47 -07:00
meson6_timer.c
metag_generic.c
mips-gic-timer.c clocksource/drivers/mips-gic-timer: Fix an error code in 'gic_clocksource_of_init()' 2017-06-27 11:25:40 +02:00
mmio.c
mps2-timer.c
mtk_timer.c
mxs_timer.c
nomadik-mtu.c
numachip.c
owl-timer.c clocksource: owl: Add S900 support 2017-06-18 21:20:06 +02:00
pxa_timer.c
qcom-timer.c
renesas-ostm.c
rockchip_timer.c
samsung_pwm_timer.c clocksource/drivers: Rename CLKSRC_OF to TIMER_OF 2017-06-14 12:01:03 +02:00
scx200_hrt.c
sh_cmt.c
sh_mtu2.c
sh_tmu.c
sun4i_timer.c clocksource/drivers/sun4i: Switch to the timer-of common init 2017-06-26 18:32:04 +02:00
tango_xtal.c
tcb_clksrc.c clocksource/drivers/tcb_clksrc: Make IO endian agnostic 2017-06-27 11:25:20 +02:00
tegra20_timer.c
time-armada-370-xp.c
time-efm32.c
time-lpc32xx.c
time-orion.c
time-pistachio.c
timer-atlas7.c
timer-atmel-pit.c
timer-atmel-st.c
timer-digicolor.c
timer-fttmr010.c clocksource/drivers/fttmr010: Factor out clock read code 2017-06-14 12:02:50 +02:00
timer-imx-gpt.c
timer-integrator-ap.c
timer-keystone.c
timer-nps.c
timer-of.c clocksource/drivers/timer-of: Handle of_irq_get_byname() result correctly 2017-07-17 22:43:00 +02:00
timer-of.h clocksource/drivers: Add timer-of common init routine 2017-06-14 12:02:32 +02:00
timer-oxnas-rps.c
timer-prima2.c
timer-probe.c clocksource/drivers: Rename CLKSRC_OF to TIMER_OF 2017-06-14 12:01:03 +02:00
timer-sp804.c
timer-sp.h
timer-stm32.c
timer-sun5i.c Merge branch 'timers/urgent' into timers/core 2017-06-21 09:07:52 +02:00
timer-ti-32k.c
timer-u300.c
versatile.c
vf_pit_timer.c
vt8500_timer.c
zevio-timer.c