Skip to content
Commit 4ec2b69d authored by Xiongfeng Wang's avatar Xiongfeng Wang Committed by Zhenyu Wang
Browse files

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: 9bdb0734 ("drm/i915/gvt: Change KVMGT as self load module")
Reviewed-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1605187352-51761-1-git-send-email-wangxiongfeng2@huawei.com
parent edb8d77a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment