]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit5cf52332cbf58e0f8c1c0e5cb1e0820f87ad7d50
treef793fe43b0ddeec4ae80e45cc52ba07d61269f81
parent07ac36642af5522f1841f247b8464fc99821e646
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