Files
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 <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
2017-07-17 22:43:00 +02:00
..
2016-12-25 10:47:44 +01:00
2017-06-18 21:20:06 +02:00