Skip to content

Commit

Permalink
drm/atomic: Don't open-code CRTC state destroy
Browse files Browse the repository at this point in the history
One failure path in crtc_helper had an open-coded CRTC state destroy
which didn't actually call through to the driver's specified state
destroy. Fix that.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Daniel Stone authored and Daniel Vetter committed May 7, 2015
1 parent bfcd74d commit 9b0adc2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/gpu/drm/drm_crtc_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,12 @@ int drm_helper_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mod
if (crtc_funcs->atomic_check) {
ret = crtc_funcs->atomic_check(crtc, crtc_state);
if (ret) {
kfree(crtc_state);
if (crtc->funcs->atomic_destroy_state) {
crtc->funcs->atomic_destroy_state(crtc,
crtc_state);
} else {
kfree(crtc_state);
}

return ret;
}
Expand Down

0 comments on commit 9b0adc2

Please sign in to comment.