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: Don't crash for invalid duplicate_state()

It's possible for users to try to duplicate the CRTC state even when the
state doesn't exist. drm_atomic_helper_crtc_duplicate_state() (and other
users of __drm_atomic_helper_crtc_duplicate_state()) already guard this
with a WARN_ON() instead of crashing, so let's do that here too.

Fixes: 4e257d9eee23 ("drm/rockchip: get rid of rockchip_drm_crtc_mode_config")
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20220617172623.1.I62db228170b1559ada60b8d3e1637e1688424926@changeid

authored by

Brian Norris and committed by
Heiko Stuebner
1449110b 5cd56168

+3
+3
drivers/gpu/drm/rockchip/rockchip_drm_vop.c
··· 1572 1572 { 1573 1573 struct rockchip_crtc_state *rockchip_state; 1574 1574 1575 + if (WARN_ON(!crtc->state)) 1576 + return NULL; 1577 + 1575 1578 rockchip_state = kzalloc(sizeof(*rockchip_state), GFP_KERNEL); 1576 1579 if (!rockchip_state) 1577 1580 return NULL;