drm/i915: Free stolen node on failed preallocation
The odds of this happening are *extremely* unlikely. Reported-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
5cef07e162
commit
f7f181843e
|
@ -402,7 +402,7 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_device *dev,
|
|||
&obj->gtt_space);
|
||||
if (ret) {
|
||||
DRM_DEBUG_KMS("failed to allocate stolen GTT space\n");
|
||||
goto unref_out;
|
||||
goto err_out;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -413,7 +413,8 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_device *dev,
|
|||
|
||||
return obj;
|
||||
|
||||
unref_out:
|
||||
err_out:
|
||||
drm_mm_put_block(stolen);
|
||||
drm_gem_object_unreference(&obj->base);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue