Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b0adc29 authored by Daniel Stone's avatar Daniel Stone Committed by Daniel Vetter
Browse files

drm/atomic: Don't open-code CRTC state destroy



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: default avatarDaniel Stone <daniels@collabora.com>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent bfcd74d2
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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) {
			if (crtc->funcs->atomic_destroy_state) {
				crtc->funcs->atomic_destroy_state(crtc,
				                                  crtc_state);
			} else {
				kfree(crtc_state);
			}

			return ret;
		}