]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: fix incorrect null check on pointer
authorColin Ian King <colin.king@canonical.com>
Fri, 26 Apr 2019 21:48:11 +0000 (22:48 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 29 Apr 2019 19:56:49 +0000 (14:56 -0500)
commit6d6cc902e4a120836dd53a5b6151a2898c88be81
treea09b96b85ab56d0aac6f7107074f28754c19ca1f
parenteaedc2549f348bad17f5b8284ba9a7fa75f21f6a
drm/amd/display: fix incorrect null check on pointer

Currently an allocation is being made but the allocation failure
check is being performed on another pointer. Fix this by checking
the correct pointer. Also use the normal kernel idiom for null
pointer checks.

Addresses-Coverity: ("Resource leak")
Fixes: 00c83927fb2a ("drm/amd/display: Add function to copy DC streams")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_stream.c