drm/i915: Fix an error handling in 'intel_framebuffer_init()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 10 Sep 2017 08:56:42 +0000 (10:56 +0200)
committerJani Nikula <jani.nikula@intel.com>
Mon, 11 Sep 2017 10:52:00 +0000 (13:52 +0300)
We should go through the error handling path to decrease the
'framebuffer_references' as done everywhere else in this function.

Fixes: 2e2adb05736c ("drm/i915: Add render decompression support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170910085642.13673-1-christophe.jaillet@wanadoo.fr
drivers/gpu/drm/i915/intel_display.c

index 844efd45fed34750d62da9114b94463fe8b32359..dbe7d8682c97f757c71859f3266de459c58214d9 100644 (file)
@@ -14105,7 +14105,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 
                if (mode_cmd->handles[i] != mode_cmd->handles[0]) {
                        DRM_DEBUG_KMS("bad plane %d handle\n", i);
-                       return -EINVAL;
+                       goto err;
                }
 
                stride_alignment = intel_fb_stride_alignment(fb, i);