Re: [PATCH] drm/qxl: fix null pointer dereference in qxl_add_mode

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

[PATCH] drm/qxl: fix null pointer dereference in qxl_add_mode

2024-06-25 Thread Ma Ke
In qxl_add_mode(), the return value of drm_cvt_mode() is assigned to mode, which will lead to a possible NULL pointer dereference on failure of drm_cvt_mode(). Add a check to avoid npd. Signed-off-by: Ma Ke --- drivers/gpu/drm/qxl/qxl_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git