Skip to content
Commit 5cb1b130 authored by Chenyuan Yang's avatar Chenyuan Yang Committed by Abhinav Kumar
Browse files

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 da29abe7
("drm/amd/display: Fix error pointers in amdgpu_dm_crtc_mem_type_changed").

Fixes: 774bcfb7 ("drm/msm/dpu: add support for virtual planes")
Signed-off-by: default avatarChenyuan Yang <chenyuan0y@gmail.com>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: default avatarAbhinav 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: default avatarAbhinav Kumar <quic_abhinavk@quicinc.com>
parent bcaa391e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment