drm/i915/gvt: Fix check error of vgpu create failure message
authorZhenyu Wang <zhenyuw@linux.intel.com>
Thu, 22 Feb 2018 07:16:14 +0000 (15:16 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Tue, 6 Mar 2018 05:19:25 +0000 (13:19 +0800)
Fix check error at

  CHECK   drivers/gpu/drm/i915//gvt/kvmgt.c
drivers/gpu/drm/i915//gvt/kvmgt.c:455 intel_vgpu_create() error: we previously assumed 'vgpu' could be null (see line 454)

For failed vgpu create, just show error return in failure message.

Reviewed-by: Zhi Wang <zhi.a.wang@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/kvmgt.c

index d86071a32b6ab29d2f8a90338533b5609823f56f..6fce1fae7d55503d4a18a987f5399fffe14e552b 100644 (file)
@@ -452,7 +452,7 @@ static int intel_vgpu_create(struct kobject *kobj, struct mdev_device *mdev)
        vgpu = intel_gvt_ops->vgpu_create(gvt, type);
        if (IS_ERR_OR_NULL(vgpu)) {
                ret = vgpu == NULL ? -EFAULT : PTR_ERR(vgpu);
-               gvt_vgpu_err("failed to create intel vgpu: %d\n", ret);
+               gvt_err("failed to create intel vgpu: %d\n", ret);
                goto out;
        }