Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0122f31 authored by Xiaoguang Chen's avatar Xiaoguang Chen Committed by Zhenyu Wang
Browse files

drm/i915/gvt: fix detect_host calling logic



Like other routines, intel_gvt_hypervisor_detect_host returns 0
for success.

Signed-off-by: default avatarXiaoguang Chen <xiaoguang.chen@intel.com>
Signed-off-by: default avatarJike Song <jike.song@intel.com>
Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
parent 64fafcf5
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -65,6 +65,8 @@ struct intel_gvt_io_emulation_ops intel_gvt_io_emulation_ops = {
 */
int intel_gvt_init_host(void)
{
	int ret;

	if (intel_gvt_host.initialized)
		return 0;

@@ -90,7 +92,8 @@ int intel_gvt_init_host(void)
		return -EINVAL;

	/* Try to detect if we're running in host instead of VM. */
	if (!intel_gvt_hypervisor_detect_host())
	ret = intel_gvt_hypervisor_detect_host();
	if (ret)
		return -ENODEV;

	gvt_dbg_core("Running with hypervisor %s in host mode\n",