drm/omap: gem: Fix omap_gem_new() error path
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 2 Mar 2016 10:51:19 +0000 (12:51 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 3 Mar 2016 15:38:46 +0000 (17:38 +0200)
commitc2eb77ff717c3aa403f5807425a7f2b2cb67b6b3
tree84fe8bfbf7548fce6e5aa8d7f9b89dda18daf0bf
parent39cd66209db9c0e8e80e24321d9f47de8ac5c52e
drm/omap: gem: Fix omap_gem_new() error path

When an error occurs in omap_gem_new() the function calls
omap_gem_free_object() to clean up. However, that function expects to be
called on a fully initialized GEM object and thus crashes.

Replace it by manual cleanup.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/omap_gem.c