]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: fix dereference of pointer fs_params before it is null checked
authorColin Ian King <colin.king@canonical.com>
Tue, 20 Nov 2018 17:17:45 +0000 (17:17 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 21 Nov 2018 20:32:20 +0000 (15:32 -0500)
commitcfbb2a4b20184c6a58e7ca0a7265ad68621e7686
tree183cc2cc85c090a8bfed2558b7fa5e0e8115b9ce
parent14f4937ef459e7945d4e75e751791a55bf506018
drm/amd/display: fix dereference of pointer fs_params before it is null checked

Currently there are several instances of pointer fs_params being
dereferenced before fs_params is being null checked.  Fix this by
only dereferencing fs_params after the null check.

Detected by CoverityScan, CID#1475565 ("Dereference before null check")

Fixes: 9a285cd734c8 ("drm/amd/display: Add support for Freesync 2 HDR and Content to Display Mapping")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/color/color_gamma.c