]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
drm: Balance error path for GEM handle allocation
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 9 May 2016 18:01:27 +0000 (12:01 -0600)
committerKamal Mostafa <kamal@canonical.com>
Mon, 16 May 2016 17:27:32 +0000 (10:27 -0700)
commitb8874751ef9e4ba786511892e9e2ed9aa6f49909
tree6c77d8668cbecf2e68aacef6803fdb96f601f409
parent3d26b8d8361a9cfa098fe8548f1836573925cc7d
drm: Balance error path for GEM handle allocation

BugLink: http://bugs.launchpad.net/bugs/1579610
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>
(cherry picked from commit 6984128d01cf935820a0563f3a00c6623ba58109)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
drivers/gpu/drm/drm_gem.c