]> git.itanic.dy.fi Git - linux-stable/commit
clockevents: sun5i: Fix setup_irq init sequence
authorYongbae Park <yongbae2@gmail.com>
Tue, 3 Mar 2015 04:05:48 +0000 (13:05 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2015 12:03:49 +0000 (14:03 +0200)
commit0e1e3b03a3edcc2fd5a56fbbbc03d6eec07146c9
tree1d0de5193045882641303ba28ab6ea49ebfe5f57
parent08356188de276d7c08130dbe146d618fe9b3d76b
clockevents: sun5i: Fix setup_irq init sequence

commit 1096be084ac59927158ce80ff1d31c33eed0e565 upstream.

The interrupt is enabled before the handler is set. Even this bug
did not appear, it is potentially dangerous as it can lead to a
NULL pointer dereference.

Fix the error by enabling the interrupt after
clockevents_config_and_register() is called.

Signed-off-by: Yongbae Park <yongbae2@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clocksource/timer-sun5i.c