[PATCH 25/29] drm/amd/display: Use plane pointer to avoid line breaks
Harry Wentland
harry.wentland at amd.com
Thu Oct 26 18:35:21 UTC 2017
Signed-off-by: Harry Wentland <harry.wentland at amd.com>
Reviewed-by: Mikita Lipski <Mikita.Lipski at amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng at amd.com>
Acked-by: Harry Wentland <harry.wentland at amd.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 +++++++----
1 file changed, 7 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 cd295a202950..55fb0b282f44 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1331,13 +1331,16 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
}
for (i = 0; i < dm->dc->caps.max_planes; i++) {
- mode_info->planes[i] = kzalloc(sizeof(struct amdgpu_plane),
- GFP_KERNEL);
- if (!mode_info->planes[i]) {
+ struct amdgpu_plane *plane;
+
+ plane = kzalloc(sizeof(struct amdgpu_plane), GFP_KERNEL);
+ mode_info->planes[i] = plane;
+
+ if (!plane) {
DRM_ERROR("KMS: Failed to allocate plane\n");
goto fail_free_planes;
}
- mode_info->planes[i]->base.type = mode_info->plane_type[i];
+ plane->base.type = mode_info->plane_type[i];
/*
* HACK: IGT tests expect that each plane can only have one
--
2.14.1
More information about the amd-gfx
mailing list