diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2017-07-17 21:00:44 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-07-17 22:43:00 +0200 |
commit | 32f2fea6e77e64cd4045ec2d5deb879aada3b476 (patch) | |
tree | 8f6963fb7d9e6385bfa3e77617c9f050066a549b /arch/x86/boot/Makefile | |
parent | 935acd3f5ebc34984bd4de075e0f83e6ea10c28d (diff) | |
download | lwn-32f2fea6e77e64cd4045ec2d5deb879aada3b476.tar.gz lwn-32f2fea6e77e64cd4045ec2d5deb879aada3b476.zip |
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: dc11bae78529 ("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
Diffstat (limited to 'arch/x86/boot/Makefile')
0 files changed, 0 insertions, 0 deletions