diff options
author | 2021-08-10 21:07:03 -0700 | |
---|---|---|
committer | 2021-08-11 17:19:54 -0400 | |
commit | 554594567b1fa3da74f88ec7b2dc83d000c58e98 (patch) | |
tree | 45fc9c6d8f50ef91e8e6e99fee26d3dd017b63ee /drivers/gpu/drm/amd/pm/amdgpu_pm.c | |
parent | gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port() (diff) | |
download | linux-dev-554594567b1fa3da74f88ec7b2dc83d000c58e98.tar.xz linux-dev-554594567b1fa3da74f88ec7b2dc83d000c58e98.zip |
drm/display: fix possible null-pointer dereference in dcn10_set_clock()
The variable dc->clk_mgr is checked in:
if (dc->clk_mgr && dc->clk_mgr->funcs->get_clock)
This indicates dc->clk_mgr can be NULL.
However, it is dereferenced in:
if (!dc->clk_mgr->funcs->get_clock)
To fix this null-pointer dereference, check dc->clk_mgr and the function
pointer dc->clk_mgr->funcs->get_clock earlier, and return if one of them
is NULL.
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Tuo Li <islituo@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/amdgpu_pm.c')
0 files changed, 0 insertions, 0 deletions