[PATCH] drm/nouveau: Fix null pointer dereference

2025-04-12 Thread Chenyuan Yang
The return value of drm_mode_duplicate() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Signed-off-by: Chenyuan Yang Fixes: 6ee738610f41 ("drm/nouveau: Add DRM driver for NVIDIA GPUs") --- drivers/gpu/d

[PATCH] gma500/cdv: fix null pointer dereference in cdv_intel_dp_get_modes

2025-04-07 Thread Chenyuan Yang
ce in cdv_intel_lvds_get_modes"). This is found by our static analysis tool KNighter. Signed-off-by: Chenyuan Yang Fixes: d112a8163f83 ("gma500/cdv: Add eDP support") --- drivers/gpu/drm/gma500/cdv_intel_dp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/gma5

[PATCH] drm/sun4i: backend: Fix error pointers in sun4i_backend_atomic_check

2025-03-15 Thread Chenyuan Yang
dereferencing them. Similar to commit da29abe71e16 ("drm/amd/display: Fix error pointers in amdgpu_dm_crtc_mem_type_changed"). Fixes: 96180dde23b7 ("drm/sun4i: backend: Add a custom atomic_check for the frontend") Signed-off-by: Chenyuan Yang --- drivers/gpu/drm/sun4i/sun4i_b

Re: [PATCH] drm/sun4i: backend: Fix error pointers in sun4i_backend_atomic_check

2025-03-15 Thread Chenyuan Yang
fb; if (!sun4i_backend_plane_is_supported(plane_state, &layer_state->uses_frontend)) -- -Chenyuan On Fri, Mar 14, 2025 at 2:17 AM Maxime Ripard wrote: > > Hi, > > On Thu, Mar 13, 2025 at 08:20:29PM -0500, Chenyuan Yang wrote: > > The function sun4i_back

[PATCH] drm/msm/dpu: Fix error pointers in dpu_plane_virtual_atomic_check

2025-03-14 Thread Chenyuan Yang
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 --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 3