diff options
| author | Srinivasan Shanmugam <[email protected]> | 2024-07-22 11:28:32 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2024-07-23 21:42:29 +0000 |
| commit | 4b6377f0e96085cbec96eb7f0b282430ccdd3d75 (patch) | |
| tree | ed865309215609469cdd997eae886087215a59a5 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | |
| parent | drm/amd/display: Add NULL check for clk_mgr and clk_mgr->funcs in dcn30_init_hw (diff) | |
| download | kernel-4b6377f0e96085cbec96eb7f0b282430ccdd3d75.tar.gz kernel-4b6377f0e96085cbec96eb7f0b282430ccdd3d75.zip | |
drm/amd/display: Add NULL check for clk_mgr and clk_mgr->funcs in dcn401_init_hw
This commit addresses a potential null pointer dereference issue in the
`dcn401_init_hw` function. The issue could occur when `dc->clk_mgr` or
`dc->clk_mgr->funcs` is null.
The fix adds a check to ensure `dc->clk_mgr` and `dc->clk_mgr->funcs` is
not null before accessing its functions. This prevents a potential null
pointer dereference.
Reported by smatch:
drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn401/dcn401_hwseq.c:416 dcn401_init_hw() error: we previously assumed 'dc->clk_mgr' could be null (see line 225)
Cc: Tom Chung <[email protected]>
Cc: Rodrigo Siqueira <[email protected]>
Cc: Roman Li <[email protected]>
Cc: Alex Hung <[email protected]>
Cc: Aurabindo Pillai <[email protected]>
Cc: Harry Wentland <[email protected]>
Cc: Hamza Mahfooz <[email protected]>
Signed-off-by: Srinivasan Shanmugam <[email protected]>
Reviewed-by: Alex Hung <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.h')
0 files changed, 0 insertions, 0 deletions
