]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amd/display: Remove redundant NULL check in dce110_set_input_transfer_func
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Tue, 23 Apr 2024 16:19:51 +0000 (21:49 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 2 May 2024 19:41:26 +0000 (15:41 -0400)
commitff75caceb93d8793bd81f69863c7644423ed09dd
treed736633b151466029eaba93c93f0eab159b277fa
parent6e4aa08fa9c6c0c027fc86f242517c925d159393
drm/amd/display: Remove redundant NULL check in dce110_set_input_transfer_func

This commit removes a redundant NULL check in the
`dce110_set_input_transfer_func` function in the `dce110_hwseq.c` file.
The variable `tf` is assigned the address of
`plane_state->in_transfer_func` unconditionally, so it can never be
`NULL`. Therefore, the check `if (tf == NULL)` is unnecessary and has
been removed.

Fixes the below smatch warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dce110/dce110_hwseq.c:301 dce110_set_input_transfer_func() warn: address of 'plane_state->in_transfer_func' is non-NULL

Fixes: 285a7054bf81 ("drm/amd/display: Remove plane and stream pointers from dc scratch")
Cc: Wenjing Liu <wenjing.liu@amd.com>
Cc: Tom Chung <chiahsuan.chung@amd.com>
Cc: Alvin Lee <alvin.lee2@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Roman Li <roman.li@amd.com>
Cc: Hersen Wu <hersenxs.wu@amd.com>
Cc: Alex Hung <alex.hung@amd.com>
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c