Commit f922237d authored by Tom St Denis's avatar Tom St Denis Committed by Alex Deucher

drm/amd/display: Tidy up dm_drm_plane_reset()

Move WARN_ON higher up and in doing so fix brace style.
Signed-off-by: default avatarTom St Denis <tom.stdenis@amd.com>
Acked-by: default avatarAndrey Grodzovsky  <andey.grodzovsky@amd.com>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a68d90e7
...@@ -2873,13 +2873,13 @@ static void dm_drm_plane_reset(struct drm_plane *plane) ...@@ -2873,13 +2873,13 @@ static void dm_drm_plane_reset(struct drm_plane *plane)
plane->funcs->atomic_destroy_state(plane, plane->state); plane->funcs->atomic_destroy_state(plane, plane->state);
amdgpu_state = kzalloc(sizeof(*amdgpu_state), GFP_KERNEL); amdgpu_state = kzalloc(sizeof(*amdgpu_state), GFP_KERNEL);
WARN_ON(amdgpu_state == NULL);
if (amdgpu_state) { if (amdgpu_state) {
plane->state = &amdgpu_state->base; plane->state = &amdgpu_state->base;
plane->state->plane = plane; plane->state->plane = plane;
plane->state->rotation = DRM_MODE_ROTATE_0; plane->state->rotation = DRM_MODE_ROTATE_0;
} else }
WARN_ON(1);
} }
static struct drm_plane_state * static struct drm_plane_state *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment