Skip to content

Commit

Permalink
drm/amd/display: Tidy up dm_drm_plane_reset()
Browse files Browse the repository at this point in the history
Move WARN_ON higher up and in doing so fix brace style.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Acked-by: Andrey Grodzovsky  <andey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Tom St Denis authored and Alex Deucher committed Oct 21, 2017
1 parent a68d90e commit f922237
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2873,13 +2873,13 @@ static void dm_drm_plane_reset(struct drm_plane *plane)
plane->funcs->atomic_destroy_state(plane, plane->state);

amdgpu_state = kzalloc(sizeof(*amdgpu_state), GFP_KERNEL);

WARN_ON(amdgpu_state == NULL);

if (amdgpu_state) {
plane->state = &amdgpu_state->base;
plane->state->plane = plane;
plane->state->rotation = DRM_MODE_ROTATE_0;
} else
WARN_ON(1);
}
}

static struct drm_plane_state *
Expand Down

0 comments on commit f922237

Please sign in to comment.