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>

authored by Chris Wilson and committed by Keith Packard 2dd251f0 0ee5623f

+3 -1
+3 -1
drivers/gpu/drm/i915/intel_display.c
··· 6579 6579 return ERR_PTR(-ENOENT); 6580 6580 6581 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 6584 return ERR_PTR(-ENOMEM); 6585 + } 6584 6586 6585 6587 ret = intel_framebuffer_init(dev, intel_fb, mode_cmd, obj); 6586 6588 if (ret) {