Skip to content

Commit

Permalink
drm: omapdrm: gem: Fix GEM object destroy in error path
Browse files Browse the repository at this point in the history
Use the omap_gem_free_object() function to destroy the GEM object in the
omap_gem_new_handle() error path instead of doing it manually (and
incorrectly).

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Laurent Pinchart authored and Tomi Valkeinen committed Dec 31, 2015
1 parent 00e9c7c commit 74128a2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/omapdrm/omap_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1452,8 +1452,7 @@ int omap_gem_new_handle(struct drm_device *dev, struct drm_file *file,

ret = drm_gem_handle_create(file, obj, handle);
if (ret) {
drm_gem_object_release(obj);
kfree(obj); /* TODO isn't there a dtor to call? just copying i915 */
omap_gem_free_object(obj);
return ret;
}

Expand Down

0 comments on commit 74128a2

Please sign in to comment.