]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Balance error path for GEM handle allocation
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 4 Jan 2016 10:10:59 +0000 (10:10 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 5 Jan 2016 07:59:06 +0000 (08:59 +0100)
commitd0a86078d80b621ee9000af575a21db003d1eba8
tree8c6bc6c3a20b1a8563cea2b3aa229bd2d53a1ead
parent3af81172b6df3369ef7e095efd2b6e7d208720e4
drm: Balance error path for GEM handle allocation

The current error path for failure when establishing a handle for a GEM
object is unbalance, e.g. we call object_close() without calling first
object_open(). Use the typical onion structure to only undo what has
been set up prior to the error.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_gem.c