aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-04-16 10:23:51 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-21 15:13:09 -0700
commit10bb564c39e90bb0a23bd925490e8cf1a7af9372 (patch)
treeb8706a3a26d6164d186da5ff6b3a3c89b3dbf455 /drivers/gpu/drm
parent911c1616880507b32b0b6d89db7e7055dd803079 (diff)
downloadlinux-2.6.38-lt-ux500-10bb564c39e90bb0a23bd925490e8cf1a7af9372.tar.gz
drm/i915: Release object along create user fb error path
commit 2dd251f0a294300a1cf8f4b63768145fa6153c4d upstream. Reported-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c4
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 ecf8f947b4b..841558bc91c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6005,8 +6005,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) {