]> git.baikalelectronics.ru Git - kernel.git/commit
staging: imx/drm: request irq only after adding the crtc
authorPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 20 Feb 2013 02:57:01 +0000 (10:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Mar 2013 16:31:48 +0000 (09:31 -0700)
commitcca3af4193b28462ed435f32a395206f8e48dd14
tree23952890412449a978d3b59ff6f10472c820e99c
parentf606379892fa65be194ca80ef7aee9a110409453
staging: imx/drm: request irq only after adding the crtc

If the bootloader already enabled the display, the interrupt handler
will be called as soon as it is registered. If the CRTC is not already
added at this time, the call to imx_drm_handle_vblank will result in
a NULL pointer dereference.

The patch fixes a kernel panic [1], which has been on linux-next since
Jan 8 [2].

[1] http://thread.gmane.org/gmane.linux.ports.arm.kernel/218858
[2] http://thread.gmane.org/gmane.linux.ports.arm.kernel/208192

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/imx-drm/ipuv3-crtc.c