diff options
| author | Srinivasan Shanmugam <[email protected]> | 2024-07-21 14:00:16 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2024-07-23 21:41:56 +0000 |
| commit | ac2140449184a26eac99585b7f69814bd3ba8f2d (patch) | |
| tree | d0018cc8caf3a7b962a06daf96779f1c7d1a6caf /drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | |
| parent | drm/amd/display: Add null check for head_pipe in dcn201_acquire_free_pipe_for... (diff) | |
| download | kernel-ac2140449184a26eac99585b7f69814bd3ba8f2d.tar.gz kernel-ac2140449184a26eac99585b7f69814bd3ba8f2d.zip | |
drm/amd/display: Add null check for head_pipe in dcn32_acquire_idle_pipe_for_head_pipe_in_layer
This commit addresses a potential null pointer dereference issue in the
`dcn32_acquire_idle_pipe_for_head_pipe_in_layer` function. The issue
could occur when `head_pipe` is null.
The fix adds a check to ensure `head_pipe` is not null before asserting
it. If `head_pipe` is null, the function returns NULL to prevent a
potential null pointer dereference.
Reported by smatch:
drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn32/dcn32_resource.c:2690 dcn32_acquire_idle_pipe_for_head_pipe_in_layer() error: we previously assumed 'head_pipe' could be null (see line 2681)
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: Tom Chung <[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
