From: SivapiriyanKumarasamy Date: Sat, 24 Nov 2018 01:33:35 +0000 (-0500) Subject: drm/amd/display: Minor code cleanup X-Git-Tag: v5.15~6763^2~26^2~146 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=43995f8fb64c54b740262f72ab51d41268c0f7ff;p=platform%2Fkernel%2Flinux-starfive.git drm/amd/display: Minor code cleanup [WHY] There is an extra null check for fs_params in the build_freesync_hdr function detected by Smatch. [HOW] 1) Remove the extra null check since it is checked in the caller. Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c index 479b77c..beb7bda 100644 --- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c +++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c @@ -823,7 +823,7 @@ static bool build_freesync_hdr(struct pwl_float_data_ex *rgb_regamma, bool is_clipped = false; struct fixed31_32 sdr_white_level; - if (fs_params == NULL || fs_params->max_content == 0 || + if (fs_params->max_content == 0 || fs_params->max_display == 0) return false;