diff options
author | Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> | 2024-07-31 10:45:00 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-08-06 17:44:20 +0300 |
commit | 28574b08c70e56d34d6f6379326a860b96749051 (patch) | |
tree | b44a4ffd84cc12e10d938b179fcfbbc0822ae516 /drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | |
parent | dd340acd42c24a3f28dd22fae6bf38662334264c (diff) | |
download | linux-28574b08c70e56d34d6f6379326a860b96749051.tar.xz |
drm/amd/display: Add NULL check for function pointer in dcn32_set_output_transfer_func
This commit adds a null check for the set_output_gamma function pointer
in the dcn32_set_output_transfer_func function. Previously,
set_output_gamma was being checked for null, but then it was being
dereferenced without any null check. This could lead to a null pointer
dereference if set_output_gamma is null.
To fix this, we now ensure that set_output_gamma is not null before
dereferencing it. We do this by adding a null check for set_output_gamma
before the call to set_output_gamma.
Cc: Tom Chung <chiahsuan.chung@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Roman Li <roman.li@amd.com>
Cc: Alex Hung <alex.hung@amd.com>
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c')
0 files changed, 0 insertions, 0 deletions