From: Ville Syrjälä Date: Thu, 15 Oct 2015 17:39:58 +0000 (+0300) Subject: drm: Don't leak fb when plane crtc coodinates are bad X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c390eed025dbbd09fff6cf128fb4eee83c9008a3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm: Don't leak fb when plane crtc coodinates are bad Signed-off-by: Ville Syrjälä Reviewed-by: Matt Roper Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 6058f4b141fe..ad7b7a762018 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -2341,7 +2341,8 @@ static int __setplane_internal(struct drm_plane *plane, crtc_y > INT_MAX - (int32_t) crtc_h) { DRM_DEBUG_KMS("Invalid CRTC coordinates %ux%u+%d+%d\n", crtc_w, crtc_h, crtc_x, crtc_y); - return -ERANGE; + ret = -ERANGE; + goto out; }