]> git.hungrycats.org Git - linux/commit
drm/rockchip: vop: Fix a dereferenced before check warning
authorAndy Yan <andy.yan@rock-chips.com>
Mon, 21 Oct 2024 07:28:06 +0000 (15:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Nov 2024 14:37:28 +0000 (15:37 +0100)
commit656dbd1c21c2c088c70059cdd43ec83e7d54ec4d
tree2b71be27da1a12386859a7ef2877a4fa34675150
parentcc673c7151ac5879f489b41a2d299b0fa173f336
drm/rockchip: vop: Fix a dereferenced before check warning

[ Upstream commit ab1c793f457f740ab7108cc0b1340a402dbf484d ]

The 'state' can't be NULL, we should check crtc_state.

Fix warning:
drivers/gpu/drm/rockchip/rockchip_drm_vop.c:1096
vop_plane_atomic_async_check() warn: variable dereferenced before check
'state' (see line 1077)

Fixes: 5ddb0bd4ddc3 ("drm/atomic: Pass the full state to planes async atomic check and update")
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20241021072818.61621-1-andyshrk@163.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/rockchip/rockchip_drm_vop.c