]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fix bug in debugfs crc_win_update entry
authorWayne Lin <Wayne.Lin@amd.com>
Fri, 26 Nov 2021 07:19:57 +0000 (15:19 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 7 Dec 2021 18:10:38 +0000 (13:10 -0500)
commit43b9987b2dad94129b29e14d28b0df2f36bf63a5
tree8ee34505f6b343e0c3530fffd00e76039ba23a13
parent0ca1a5721590c171dd64a71edfc1ed3e6b7a5156
drm/amd/display: Fix bug in debugfs crc_win_update entry

[Why]
crc_rd_wrk shouldn't be null in crc_win_update_set(). Current programming
logic is inconsistent in crc_win_update_set().

[How]
Initially, return if crc_rd_wrk is NULL. Later on, we can use member of
crc_rd_wrk safely.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: eda37bc86d4a ("drm/amd/display: Use PSP TA to read out crc")
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Pavle Kotarac <Pavle.Kotarac@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c