]> 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)
commit388481f84ccb8fc31f87842e432434615f3dbaee
treef793fe43b0ddeec4ae80e45cc52ba07d61269f81
parenta64ebbc4e30dfd5781272bcd7aef4c53bf110b30
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