mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 01:34:14 +08:00
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>
This commit is contained in:
parent
0ee5623f9a
commit
2dd251f0a2
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user