diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-04-16 05:23:51 -0400 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-05-04 15:36:17 -0400 |
commit | 2dd251f0a294300a1cf8f4b63768145fa6153c4d (patch) | |
tree | 0220bae157fa4e5b70ff8d86cfb92bd7d678c61e | |
parent | 0ee5623f9a6e52df90a78bd21179f8ab370e102e (diff) |
drm/i915: Release object along create user fb error path
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>
-rw-r--r-- | 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 e522c702b04e..aab06cfaf70f 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -6579,8 +6579,10 @@ intel_user_framebuffer_create(struct drm_device *dev, | |||
6579 | return ERR_PTR(-ENOENT); | 6579 | return ERR_PTR(-ENOENT); |
6580 | 6580 | ||
6581 | intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL); | 6581 | intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL); |
6582 | if (!intel_fb) | 6582 | if (!intel_fb) { |
6583 | drm_gem_object_unreference_unlocked(&obj->base); | ||
6583 | return ERR_PTR(-ENOMEM); | 6584 | return ERR_PTR(-ENOMEM); |
6585 | } | ||
6584 | 6586 | ||
6585 | ret = intel_framebuffer_init(dev, intel_fb, mode_cmd, obj); | 6587 | ret = intel_framebuffer_init(dev, intel_fb, mode_cmd, obj); |
6586 | if (ret) { | 6588 | if (ret) { |