]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: fix dereference before NULL check
authorJosé Expósito <jose.exposito89@gmail.com>
Sun, 26 Dec 2021 11:16:14 +0000 (12:16 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 30 Dec 2021 13:54:45 +0000 (08:54 -0500)
commit325a1af96a7c7fcb4a6fa2cb28d9a2bbda25334c
tree68edd9e12f9ca561af0a39975d00b8f518617896
parent08cf51eabbffd17d4bb8739d95a48723bd4e9a54
drm/amd/display: fix dereference before NULL check

The "plane_state" pointer was access before checking if it was NULL.

Avoid a possible NULL pointer dereference by accessing the plane
address after the check.

Addresses-Coverity-ID: 1493892 ("Dereference before null check")
Fixes: e2f966fa1c4c6 ("drm/amd/display: add cyan_skillfish display support")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c