drm/amdgpu: minor cleanup of phase1 suspend code

Cleanup of phase1 suspend code to reduce unnecessary indentation.

Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Nirmoy Das 2020-07-09 15:41:40 +02:00 committed by Alex Deucher
parent d8d3493a46
commit 2b9f78481b
1 changed files with 13 additions and 10 deletions

View File

@ -2456,18 +2456,21 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev)
for (i = adev->num_ip_blocks - 1; i >= 0; i--) { for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
if (!adev->ip_blocks[i].status.valid) if (!adev->ip_blocks[i].status.valid)
continue; continue;
/* displays are handled separately */ /* displays are handled separately */
if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_DCE) { if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_DCE)
/* XXX handle errors */ continue;
r = adev->ip_blocks[i].version->funcs->suspend(adev);
/* XXX handle errors */ /* XXX handle errors */
if (r) { r = adev->ip_blocks[i].version->funcs->suspend(adev);
DRM_ERROR("suspend of IP block <%s> failed %d\n", /* XXX handle errors */
adev->ip_blocks[i].version->funcs->name, r); if (r) {
return r; DRM_ERROR("suspend of IP block <%s> failed %d\n",
} adev->ip_blocks[i].version->funcs->name, r);
adev->ip_blocks[i].status.hw = false; return r;
} }
adev->ip_blocks[i].status.hw = false;
} }
return 0; return 0;