mirror of
https://github.com/torvalds/linux.git
synced 2026-06-10 07:32:29 +02:00
drm/rockchip: vop: Fix call to crtc reset helper
[ Upstream commit5aacd29083] 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:01e2eaf40c("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 Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
6675723b6e
commit
cee7b9885e
|
|
@ -1640,7 +1640,10 @@ static void vop_crtc_reset(struct drm_crtc *crtc)
|
|||
if (crtc->state)
|
||||
vop_crtc_destroy_state(crtc, crtc->state);
|
||||
|
||||
__drm_atomic_helper_crtc_reset(crtc, &crtc_state->base);
|
||||
if (crtc_state)
|
||||
__drm_atomic_helper_crtc_reset(crtc, &crtc_state->base);
|
||||
else
|
||||
__drm_atomic_helper_crtc_reset(crtc, NULL);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DRM_ANALOGIX_DP
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user