diff options
| author | Tuo Li <[email protected]> | 2021-08-11 04:07:03 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2021-08-11 21:19:54 +0000 |
| commit | 554594567b1fa3da74f88ec7b2dc83d000c58e98 (patch) | |
| tree | 45fc9c6d8f50ef91e8e6e99fee26d3dd017b63ee /drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | |
| parent | gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access... (diff) | |
| download | kernel-554594567b1fa3da74f88ec7b2dc83d000c58e98.tar.gz kernel-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 <[email protected]>
Signed-off-by: Tuo Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c')
0 files changed, 0 insertions, 0 deletions
