drm/amdgpu: Fix false positive error log
authorStanley.Yang <Stanley.Yang@amd.com>
Fri, 15 Sep 2023 10:44:17 +0000 (18:44 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 20 Sep 2023 20:24:09 +0000 (16:24 -0400)
commita83f2bf1f4d95582cadb0136f0e1bd5b398b5c90
treea5e3c5759e91d962d2e45f923108a7abeeefe913
parent8c95cda3e15bf76360db625185aa095444aea644
drm/amdgpu: Fix false positive error log

It should first check block ras obj whether be set, it should
return 0 directly if block ras obj or hw_ops is not set.
If block doesn't support RAS just return 0 is fine.

Changed from V1:
return 0 directly if block ras obj or hw ops is not set

Signed-off-by: Stanley.Yang <Stanley.Yang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c