Skip to content

Commit f42f343

Browse files
vsyrjalajlahtine-intel
authored andcommitted
drm/i915: Fix error handling for the NV12 fb dimensions check
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: e44134f ("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> (cherry picked from commit 3b90946) Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
1 parent 76271ef commit f42f343

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/intel_display.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14646,7 +14646,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
1464614646
fb->height < SKL_MIN_YUV_420_SRC_H ||
1464714647
(fb->width % 4) != 0 || (fb->height % 4) != 0)) {
1464814648
DRM_DEBUG_KMS("src dimensions not correct for NV12\n");
14649-
return -EINVAL;
14649+
goto err;
1465014650
}
1465114651

1465214652
for (i = 0; i < fb->format->num_planes; i++) {

0 commit comments

Comments
 (0)