drm/radeon: fix a possible null pointer dereference
authorMa Ke <make_ruc2021@163.com>
Wed, 11 Oct 2023 01:21:43 +0000 (09:21 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Oct 2023 15:33:15 +0000 (11:33 -0400)
commit2c1fe3c480f9e1deefd50d4b18be4a046011ee1f
treed4da537da5f5e38853045ab9e6639c7624d5eb2c
parentffa88b0019c20d0bacda7cd1463af86ec744d52e
drm/radeon: fix a possible null pointer dereference

In radeon_tv_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 point dereference.

Signed-off-by: Ma Ke <make_ruc2021@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_connectors.c