Skip to content

Commit

Permalink
drm/i915: Release object along create user fb error path
Browse files Browse the repository at this point in the history
Reported-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Keith Packard <keithp@keithp.com>
  • Loading branch information
Chris Wilson authored and Keith Packard committed May 4, 2011
1 parent 0ee5623 commit 2dd251f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -6579,8 +6579,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) {
Expand Down

0 comments on commit 2dd251f

Please sign in to comment.