[Intel-gfx] [PATCH 03/17] drm/i915: Release object along create user fb error path

Ben Widawsky ben at bwidawsk.net
Fri Apr 22 20:21:23 CEST 2011


On Thu, Apr 21, 2011 at 10:18:18PM +0100, Chris Wilson wrote:
> Reported-by: Alan Cox <alan at linux.intel.com>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: stable at kernel.org
> ---
>  drivers/gpu/drm/i915/intel_display.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 2183c4d..16f38e4 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6582,8 +6582,10 @@ intel_user_framebuffer_create(struct drm_device *dev,
>  		return ERR_PTR(-ENOENT);
>  
>  	intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL);
> -	if (!intel_fb)
> +	if (!intel_fb) {
> +		drm_gem_object_unreference_unlocked(&obj->base);
>  		return ERR_PTR(-ENOMEM);
> +	}
>  
>  	ret = intel_framebuffer_init(dev, intel_fb, mode_cmd, obj);
>  	if (ret) {


Reviewed-by: Ben Widawsky <ben at bwidawsk.net>



More information about the Intel-gfx mailing list