diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2018-09-13 12:01:28 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-09-14 10:38:07 -0400 |
commit | 59d0f396b5abfb5ec4dbf3488cb4f24dc7c1aaf4 (patch) | |
tree | 5168d579a3fe0f58e2faaede66fcc23f35c955ba | |
parent | 741deade2a704a434bd5939118c43d38e9ddac25 (diff) |
drm/amdgpu/display: return proper error codes in dm
Replace -1 with proper error codes.
Acked-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 47c3453c688a..2662ab01c1cf 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | |||
@@ -493,7 +493,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) | |||
493 | error: | 493 | error: |
494 | amdgpu_dm_fini(adev); | 494 | amdgpu_dm_fini(adev); |
495 | 495 | ||
496 | return -1; | 496 | return -EINVAL; |
497 | } | 497 | } |
498 | 498 | ||
499 | static void amdgpu_dm_fini(struct amdgpu_device *adev) | 499 | static void amdgpu_dm_fini(struct amdgpu_device *adev) |
@@ -548,7 +548,7 @@ static int load_dmcu_fw(struct amdgpu_device *adev) | |||
548 | break; | 548 | break; |
549 | default: | 549 | default: |
550 | DRM_ERROR("Unsupported ASIC type: 0x%X\n", adev->asic_type); | 550 | DRM_ERROR("Unsupported ASIC type: 0x%X\n", adev->asic_type); |
551 | return -1; | 551 | return -EINVAL; |
552 | } | 552 | } |
553 | 553 | ||
554 | if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) { | 554 | if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) { |
@@ -1539,7 +1539,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev) | |||
1539 | link_cnt = dm->dc->caps.max_links; | 1539 | link_cnt = dm->dc->caps.max_links; |
1540 | if (amdgpu_dm_mode_config_init(dm->adev)) { | 1540 | if (amdgpu_dm_mode_config_init(dm->adev)) { |
1541 | DRM_ERROR("DM: Failed to initialize mode config\n"); | 1541 | DRM_ERROR("DM: Failed to initialize mode config\n"); |
1542 | return -1; | 1542 | return -EINVAL; |
1543 | } | 1543 | } |
1544 | 1544 | ||
1545 | /* Identify the number of planes to be initialized */ | 1545 | /* Identify the number of planes to be initialized */ |
@@ -1654,7 +1654,7 @@ fail: | |||
1654 | kfree(aconnector); | 1654 | kfree(aconnector); |
1655 | for (i = 0; i < dm->dc->caps.max_planes; i++) | 1655 | for (i = 0; i < dm->dc->caps.max_planes; i++) |
1656 | kfree(mode_info->planes[i]); | 1656 | kfree(mode_info->planes[i]); |
1657 | return -1; | 1657 | return -EINVAL; |
1658 | } | 1658 | } |
1659 | 1659 | ||
1660 | static void amdgpu_dm_destroy_drm_device(struct amdgpu_display_manager *dm) | 1660 | static void amdgpu_dm_destroy_drm_device(struct amdgpu_display_manager *dm) |