]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915: Fix error handling for the NV12 fb dimensions check
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 29 Oct 2018 14:00:31 +0000 (16:00 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 31 Oct 2018 21:44:55 +0000 (23:44 +0200)
Let's not leak obj->framebuffer_references when we decide that
the framebuffer domensions are not suitable for NV12.

Cc: stable@vger.kernel.org
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Vidya Srinivas <vidya.srinivas@intel.com>
Fixes: e44134f2673c ("drm/i915: Add NV12 support to intel_framebuffer_init")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181029140031.11765-1-ville.syrjala@linux.intel.com
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/i915/intel_display.c

index 5f0436b8e544d94fba18a66d9a412987a95e9b9a..3ea715f1c711f0b12df1859c51242a6de32b75d1 100644 (file)
@@ -14544,7 +14544,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
             fb->height < SKL_MIN_YUV_420_SRC_H ||
             (fb->width % 4) != 0 || (fb->height % 4) != 0)) {
                DRM_DEBUG_KMS("src dimensions not correct for NV12\n");
-               return -EINVAL;
+               goto err;
        }
 
        for (i = 0; i < fb->format->num_planes; i++) {