]> git.baikalelectronics.ru Git - kernel.git/commit
drm/rockchip: vop: Don't crash for invalid duplicate_state()
authorBrian Norris <briannorris@chromium.org>
Sat, 18 Jun 2022 00:26:52 +0000 (17:26 -0700)
committerHeiko Stuebner <heiko@sntech.de>
Sat, 2 Jul 2022 10:50:01 +0000 (12:50 +0200)
commit163832cbb0a966151d2d231ce332d5977b1b4f55
tree21fc2e5fa50a61c78626e065706b24d8a29aafbd
parent7a65fedc8b983c5d91373e1cd110e116f0abfc90
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: fc29ada0cc1a ("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
drivers/gpu/drm/rockchip/rockchip_drm_vop.c