Skip to content

Commit

Permalink
drm/amdgpu: Add ras supported check for register_ras_block
Browse files Browse the repository at this point in the history
Add ras supported check for register_ras_block.

Signed-off-by: yipechai <YiPeng.Chai@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
yipechai authored and alexdeucher committed Jan 14, 2022
1 parent c4381d0 commit df01fe7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
Original file line number Diff line number Diff line change
Expand Up @@ -2756,6 +2756,9 @@ int amdgpu_ras_register_ras_block(struct amdgpu_device *adev,
if (!adev || !ras_block_obj)
return -EINVAL;

if (!amdgpu_ras_asic_supported(adev))
return 0;

INIT_LIST_HEAD(&ras_block_obj->node);
list_add_tail(&ras_block_obj->node, &adev->ras_list);

Expand Down

0 comments on commit df01fe7

Please sign in to comment.