CHROMIUM: drm/exynos: drop fb reference in page_flip error path
authorMandeep Singh Baines <msb@chromium.org>
Tue, 15 Jan 2013 21:15:34 +0000 (13:15 -0800)
committerChromeBot <chrome-bot@google.com>
Tue, 15 Jan 2013 23:06:21 +0000 (15:06 -0800)
Commit "CHROMIUM: drm/exynos: Fix fb refcounting", moved the
exynos_drm_fb_get before the kds failure check. To avoid a leak,
we need to drop the reference if kds fails.

BUG=chrome-os-partner:16069
TEST=compile,run

Change-Id: I832d0f42884ba33953fa40bb156b38e01bf8a3c5
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41302
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
drivers/gpu/drm/exynos/exynos_drm_crtc.c

index fae84d1..97602d0 100644 (file)
@@ -516,6 +516,7 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
        return 0;
 
 fail_kds:
+       exynos_drm_fb_put(exynos_fb);
        *pkds = NULL;
        spin_lock_irqsave(&dev->event_lock, flags);
        exynos_crtc->flip_in_flight--;