aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_crtc_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_crtc_helper.c')
-rw-r--r--drivers/gpu/drm/drm_crtc_helper.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index dcbeb98f195a..ae9fb7a3afd6 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -649,6 +649,7 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
649 old_fb)) { 649 old_fb)) {
650 DRM_ERROR("failed to set mode on [CRTC:%d]\n", 650 DRM_ERROR("failed to set mode on [CRTC:%d]\n",
651 set->crtc->base.id); 651 set->crtc->base.id);
652 set->crtc->fb = old_fb;
652 ret = -EINVAL; 653 ret = -EINVAL;
653 goto fail; 654 goto fail;
654 } 655 }
@@ -663,8 +664,10 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
663 set->crtc->fb = set->fb; 664 set->crtc->fb = set->fb;
664 ret = crtc_funcs->mode_set_base(set->crtc, 665 ret = crtc_funcs->mode_set_base(set->crtc,
665 set->x, set->y, old_fb); 666 set->x, set->y, old_fb);
666 if (ret != 0) 667 if (ret != 0) {
668 set->crtc->fb = old_fb;
667 goto fail; 669 goto fail;
670 }
668 } 671 }
669 672
670 kfree(save_connectors); 673 kfree(save_connectors);