linux/drivers/gpu/drm/mxsfb
Marek Vasut 3cfc183052 drm: mxsfb: Fix NULL pointer dereference crash on unload
The mxsfb->crtc.funcs may already be NULL when unloading the driver,
in which case calling mxsfb_irq_disable() via drm_irq_uninstall() from
mxsfb_unload() leads to NULL pointer dereference.

Since all we care about is masking the IRQ and mxsfb->base is still
valid, just use that to clear and mask the IRQ.

Fixes: ae1ed00932 ("drm: mxsfb: Stop using DRM simple display pipeline helper")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Abrecht <public@danielabrecht.ch>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Stefan Agner <stefan@agner.ch>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20211016210446.171616-1-marex@denx.de
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-10-21 11:08:08 +02:00
..
Kconfig drm/mxsfb: Don't select DRM_KMS_FB_HELPER 2021-04-26 12:42:57 +02:00
Makefile drm: mxsfb: Rename mxsfb_crtc.c to mxsfb_kms.c 2020-07-28 17:21:01 +02:00
mxsfb_drv.c drm: mxsfb: Fix NULL pointer dereference crash on unload 2021-10-21 11:08:08 +02:00
mxsfb_drv.h drm/mxsfb: Convert to Linux IRQ interfaces 2021-08-10 20:13:45 +02:00
mxsfb_kms.c drm: mxsfb: Clear FIFO_CLEAR bit 2021-07-27 21:15:24 +02:00
mxsfb_regs.h drm: mxsfb: Increase number of outstanding requests on V4 and newer HW 2021-07-27 21:15:24 +02:00