Files
linux/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
Ma Ke 70f831f211 drm/amdgpu/vkms: fix a possible null pointer dereference
[ Upstream commit cd90511557 ]

In amdgpu_vkms_conn_get_modes(), the return value of drm_cvt_mode()
is assigned to mode, which will lead to a NULL pointer dereference
on failure of drm_cvt_mode(). Add a check to avoid null pointer
dereference.

Signed-off-by: Ma Ke <make_ruc2021@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-28 17:19:41 +00:00

17 KiB