@@ -650,9 +650,8 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
adjusted_mode = drm_mode_duplicate(dev, mode);
crtc->enabled = drm_helper_crtc_in_use(crtc);
-
if (!crtc->enabled)
- return true;
+ goto done;
saved_mode = crtc->mode;
saved_x = crtc->x;
@@ -732,10 +731,10 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
}
- /* XXX free adjustedmode */
- drm_mode_destroy(dev, adjusted_mode);
/* FIXME: add subpixel order */
done:
+ drm_mode_destroy(dev, adjusted_mode);
+
if (!ret) {
crtc->mode = saved_mode;
crtc->x = saved_x;