Replace -1 with proper error codes.
Acked-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
error:
amdgpu_dm_fini(adev);
- return -1;
+ return -EINVAL;
}
static void amdgpu_dm_fini(struct amdgpu_device *adev)
break;
default:
DRM_ERROR("Unsupported ASIC type: 0x%X\n", adev->asic_type);
- return -1;
+ return -EINVAL;
}
if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) {
link_cnt = dm->dc->caps.max_links;
if (amdgpu_dm_mode_config_init(dm->adev)) {
DRM_ERROR("DM: Failed to initialize mode config\n");
- return -1;
+ return -EINVAL;
}
/* Identify the number of planes to be initialized */
kfree(aconnector);
for (i = 0; i < dm->dc->caps.max_planes; i++)
kfree(mode_info->planes[i]);
- return -1;
+ return -EINVAL;
}
static void amdgpu_dm_destroy_drm_device(struct amdgpu_display_manager *dm)