drm/msm/dpu: Fix error pointers in dpu_plane_virtual_atomic_check

The function dpu_plane_virtual_atomic_check was dereferencing pointers
returned by drm_atomic_get_plane_state without checking for errors. This
could lead to undefined behavior if the function returns an error pointer.

This commit adds checks using IS_ERR to ensure that plane_state is
valid before dereferencing them.

Similar to commit da29abe71e16
("drm/amd/display: Fix error pointers in amdgpu_dm_crtc_mem_type_changed").

Fixes: 774bcfb73176 ("drm/msm/dpu: add support for virtual planes")
Signed-off-by: Chenyuan Yang <chenyuan0y@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/643132/
Link: https://lore.kernel.org/r/20250314011004.663804-1-chenyuan0y@gmail.com
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>

authored by Chenyuan Yang and committed by Abhinav Kumar 5cb1b130 bcaa391e

+3
+3
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
··· 1060 1060 struct drm_crtc_state *crtc_state; 1061 1061 int ret; 1062 1062 1063 + if (IS_ERR(plane_state)) 1064 + return PTR_ERR(plane_state); 1065 + 1063 1066 if (plane_state->crtc) 1064 1067 crtc_state = drm_atomic_get_new_crtc_state(state, 1065 1068 plane_state->crtc);