]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: return error when failing to take the module reference
authorXiongfeng Wang <wangxiongfeng2@huawei.com>
Thu, 12 Nov 2020 13:22:32 +0000 (21:22 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Fri, 13 Nov 2020 04:16:52 +0000 (12:16 +0800)
commitbd405ca3d2770f3a4b4d6feb8209acba40f6cea0
tree8984af56b5f8740cc9d939e0b419ffb8badb91bf
parent683cf4ef6aa170e53329b9e10e1fc02f87bee0af
drm/i915/gvt: return error when failing to take the module reference

When we fail to take the module reference, we go to the 'undo*' branch and
return. But the returned variable 'ret' has been set as zero by the
above code. Change 'ret' to '-ENODEV' in this situation.

Fixes: 9236bfe758c8 ("drm/i915/gvt: Change KVMGT as self load module")
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1605187352-51761-1-git-send-email-wangxiongfeng2@huawei.com
drivers/gpu/drm/i915/gvt/kvmgt.c