]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: fix dereference of pointer aconnector when it is null
authorColin Ian King <colin.king@canonical.com>
Fri, 8 Nov 2019 14:38:14 +0000 (14:38 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Nov 2019 20:29:42 +0000 (15:29 -0500)
commit5e9e6087ef9eeb4ca016384fa49ae59c4cb7d3d1
treee8fffc4eeecf362c327e18bc7abaf4d69f24afc8
parentc42a4d1291a2fe5cc277daf39c99da60a42244d3
drm/amd/display: fix dereference of pointer aconnector when it is null

Currently pointer aconnector is being dereferenced by the call to
to_dm_connector_state before it is being null checked, this could
lead to a null pointer dereference.  Fix this by checking that
aconnector is null before dereferencing it.

Addresses-Coverity: ("Dereference before null check")
Reviewed-by: Mikita Lipski <mikita.lipski@amd.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c