From: Imre Deak Date: Wed, 7 Sep 2016 17:23:45 +0000 (+0300) Subject: drm: Fix error path in drm_mode_page_flip_ioctl() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dec90ea1456b5a5d990d94ade2e45a2457cfd149;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm: Fix error path in drm_mode_page_flip_ioctl() This fixes the error path for platforms that don't define the new page_flip_target() hook. Fixes: c229bfbbd04 ("drm: Add page_flip_target CRTC hook v2") Testcase: igt/kms_flip/basic-flip-vs-dpms CC: Michel Dänzer Signed-off-by: Imre Deak Reviewed-by: Michel Dänzer Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473269025-16148-1-git-send-email-imre.deak@intel.com --- diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index a33dab27bb0d..631691bae01d 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -2044,7 +2044,7 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev, } out: - if (ret) + if (ret && crtc->funcs->page_flip_target) drm_crtc_vblank_put(crtc); if (fb) drm_framebuffer_unreference(fb);