]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
drm: rcar-du: lvds: Fix crash in .atomic_check when disabling connector
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fri, 27 Apr 2018 19:40:21 +0000 (22:40 +0300)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sun, 20 May 2018 07:16:59 +0000 (10:16 +0300)
commit643ca198aacc671f32ef7c0c2783f0b539070a36
tree6729fa8e0de4d819811fe72c2e9f12893b84abc7
parent60cc43fc888428bb2f18f08997432d426a243338
drm: rcar-du: lvds: Fix crash in .atomic_check when disabling connector

The connector .atomic_check() handler can be called with a NULL crtc
pointer in the connector state when the connector gets disabled
explicitly (through performing a legacy mode set or setting the
connector's CRTC_ID property to 0). This causes a crash as the crtc
pointer is dereferenced without any check.

Fix it by returning from the .atomic_check() handler when then crtc
pointer is NULL, as there is no check to be performed when the connector
gets disabled.

Fixes: c6a27fa41fab ("drm: rcar-du: Convert LVDS encoder code to bridge driver")
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_lvds.c