[PATCH] drm/gma500: fix a possible null pointer dereference

2024-06-22 Thread Ma Ke
In cdv_intel_lvds_get_modes(), 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: Ma Ke --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 2 ++ 1 file changed, 2 inse

Re: [PATCH] drm/gma500: fix a possible null pointer dereference

2024-06-22 Thread Markus Elfring
> In cdv_intel_lvds_get_modes(), 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. 1. Can a wording approach (like the following) be a better change description? A null p