Re: [PATCH] drm/gma500: fix null pointer dereference in psb_intel_lvds_get_modes

2024-06-26 Thread Markus Elfring
> In psb_intel_lvds_get_modes(), the return value of drm_mode_duplicate() is > assigned to mode, which will lead to a possible NULL pointer dereference > on failure of drm_mode_duplicate(). Add a check to avoid npd. 1. Can a wording approach (like the following) be a better change description?

Re: [PATCH] drm/gma500: fix null pointer dereference in psb_intel_lvds_get_modes

2024-06-26 Thread Jani Nikula
On Wed, 26 Jun 2024, Ma Ke wrote: > In psb_intel_lvds_get_modes(), the return value of drm_mode_duplicate() is > assigned to mode, which will lead to a possible NULL pointer dereference > on failure of drm_mode_duplicate(). Add a check to avoid npd. > > Signed-off-by: Ma Ke > --- > drivers/gpu/d

[PATCH] drm/gma500: fix null pointer dereference in psb_intel_lvds_get_modes

2024-06-26 Thread Ma Ke
In psb_intel_lvds_get_modes(), the return value of drm_mode_duplicate() is assigned to mode, which will lead to a possible NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Signed-off-by: Ma Ke --- drivers/gpu/drm/gma500/psb_intel_lvds.c | 2 ++ 1 file change