aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_gem.c
diff options
context:
space:
mode:
authorLaurent Pinchart <[email protected]>2015-12-14 20:39:39 +0000
committerTomi Valkeinen <[email protected]>2015-12-31 09:25:45 +0000
commit74128a237eca99dbca6a8ca47f062b6791441221 (patch)
tree56deed4b8343620e2fdfa1974299a0e34471f740 /drivers/gpu/drm/omapdrm/omap_gem.c
parentdrm: omapdrm: gem: Free the correct memory object (diff)
downloadkernel-74128a237eca99dbca6a8ca47f062b6791441221.tar.gz
kernel-74128a237eca99dbca6a8ca47f062b6791441221.zip
drm: omapdrm: gem: Fix GEM object destroy in error path
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 <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_gem.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_gem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c
index d9ce296eec6a..b535fed491f5 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem.c
+++ b/drivers/gpu/drm/omapdrm/omap_gem.c
@@ -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;
}