Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/rockchip: vop: Fix call to crtc reset helper

Allocation of crtc_state may fail in vop_crtc_reset, causing an invalid
pointer to be passed to __drm_atomic_helper_crtc_reset.

Fix this by adding a NULL check of crtc_state, similar to other drivers.

Fixes: 01e2eaf40c9d ("drm/rockchip: Convert to using __drm_atomic_helper_crtc_reset() for reset.")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230621223311.2239547-4-jonas@kwiboo.se

authored by

Jonas Karlman and committed by
Heiko Stuebner
5aacd290 800f7c33

+4 -1
+4 -1
drivers/gpu/drm/rockchip/rockchip_drm_vop.c
··· 1629 1629 if (crtc->state) 1630 1630 vop_crtc_destroy_state(crtc, crtc->state); 1631 1631 1632 - __drm_atomic_helper_crtc_reset(crtc, &crtc_state->base); 1632 + if (crtc_state) 1633 + __drm_atomic_helper_crtc_reset(crtc, &crtc_state->base); 1634 + else 1635 + __drm_atomic_helper_crtc_reset(crtc, NULL); 1633 1636 } 1634 1637 1635 1638 #ifdef CONFIG_DRM_ANALOGIX_DP