drm/i915/gvt: destroy the allocated idr on vgpu creating failures
authorJike Song <jike.song@intel.com>
Fri, 6 Jan 2017 07:16:22 +0000 (15:16 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Mon, 9 Jan 2017 03:11:21 +0000 (11:11 +0800)
commit4e5378918b5b96e6b93fcadf1ab84a8486ca60a1
treef793fe43b0ddeec4ae80e45cc52ba07d61269f81
parent59c0573dfbd5f66e3aa54c2ce0bebcb0953d4db4
drm/i915/gvt: destroy the allocated idr on vgpu creating failures

Once idr_alloc gets called data is allocated within the idr list, if
any error occurs afterwards, we should undo that by idr_remove on the
error path.

Signed-off-by: Jike Song <jike.song@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/vgpu.c