From: Aleksandr Burakov <hidden> Date: 2024-03-01 09:05:43
Return value of a function 'drm_cvt_mode' is dereferenced without
checking for NULL but drm_mode_create() in drm_cvt_mode() may
return NULL value in case of memory allocation error.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 1b043677d4be ("drm/qxl: add qxl_add_mode helper function")
Signed-off-by: Aleksandr Burakov <redacted>
---
drivers/gpu/drm/qxl/qxl_display.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
On Fri, Mar 01, 2024 at 11:55:11AM +0300, Aleksandr Burakov wrote:
quoted hunk
Return value of a function 'drm_cvt_mode' is dereferenced without
checking for NULL but drm_mode_create() in drm_cvt_mode() may
return NULL value in case of memory allocation error.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 1b043677d4be ("drm/qxl: add qxl_add_mode helper function")
Signed-off-by: Aleksandr Burakov <redacted>
---
drivers/gpu/drm/qxl/qxl_display.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
From: Aleksandr Burakov <hidden> Date: 2024-03-01 12:26:45
Return value of a function 'drm_cvt_mode' is dereferenced without
checking for NULL but drm_mode_create() in drm_cvt_mode() may
return NULL value in case of memory allocation error.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 1b043677d4be ("drm/qxl: add qxl_add_mode helper function")
Signed-off-by: Aleksandr Burakov <redacted>
---
v2: case with false value of 'preferred' is now taken into account
drivers/gpu/drm/qxl/qxl_display.c | 3 +++
1 file changed, 3 insertions(+)