Skip to content

Commit

Permalink
drm/amd/display: fix error case handling
Browse files Browse the repository at this point in the history
Otherwise, we will run into error case path.

v2: fix build when CONFIG_DRM_AMD_DC_DCN is not set

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Guchun Chen authored and Alex Deucher committed Oct 4, 2021
1 parent 75a07bc commit 2cbc6f4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -4211,11 +4211,12 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
}
break;
default:
break;
DRM_ERROR("Unsupported DCE IP versions: 0x%X\n",
adev->ip_versions[DCE_HWIP]);
goto fail;
}
#endif
DRM_ERROR("Unsupported ASIC type: 0x%X\n", adev->asic_type);
goto fail;
break;
}

return 0;
Expand Down Expand Up @@ -4394,11 +4395,12 @@ static int dm_early_init(void *handle)
adev->mode_info.num_dig = 4;
break;
default:
break;
DRM_ERROR("Unsupported DCE IP versions: 0x%x\n",
adev->ip_versions[DCE_HWIP]);
return -EINVAL;
}
#endif
DRM_ERROR("Unsupported ASIC type: 0x%X\n", adev->asic_type);
return -EINVAL;
break;
}

amdgpu_dm_set_irq_funcs(adev);
Expand Down

0 comments on commit 2cbc6f4

Please sign in to comment.