]> git.baikalelectronics.ru Git - kernel.git/commit
drm/rockchip: vop2: fix null pointer in plane_atomic_disable
authorMichael Tretter <m.tretter@pengutronix.de>
Fri, 28 Oct 2022 09:52:05 +0000 (11:52 +0200)
committerHeiko Stuebner <heiko@sntech.de>
Sat, 29 Oct 2022 12:41:28 +0000 (14:41 +0200)
commitb0a1fb1a48400963bb959f4504b4270dde6fce8e
treec6876d0472100784eb01c81cc96f134007bd32e3
parent7e90eecd8f088efcadb355a8618e3499c485b6c1
drm/rockchip: vop2: fix null pointer in plane_atomic_disable

If the vop2_plane_atomic_disable function is called with NULL as a
state, accessing the old_pstate runs into a null pointer exception.
However, the drm_atomic_helper_disable_planes_on_crtc function calls the
atomic_disable callback with state NULL.

Allow to disable a plane without passing a plane state by checking the
old_pstate only if a state is passed.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20221028095206.2136601-2-m.tretter@pengutronix.de
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c