drm/i915/gvt: remove the redundant info NULL check
authorTina Zhang <tina.zhang@intel.com>
Fri, 24 Mar 2017 05:56:54 +0000 (01:56 -0400)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Thu, 30 Mar 2017 05:32:12 +0000 (13:32 +0800)
The variable info is never NULL, which is checked by the caller. This
patch removes the redundant info NULL check logic.

Fixes: 695fbc08d80f ("drm/i915/gvt: replace the gvt_err with gvt_vgpu_err")
Signed-off-by: Tina Zhang <tina.zhang@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/kvmgt.c

index c7e7c9377cefeddba3b5d9f959131bc581dda059..65bcf6096e5ef61fe2283abc7d21280fd45827b7 100644 (file)
@@ -1371,13 +1371,6 @@ static int kvmgt_guest_init(struct mdev_device *mdev)
 
 static bool kvmgt_guest_exit(struct kvmgt_guest_info *info)
 {
-       struct intel_vgpu *vgpu = info->vgpu;
-
-       if (!info) {
-               gvt_vgpu_err("kvmgt_guest_info invalid\n");
-               return false;
-       }
-
        kvm_page_track_unregister_notifier(info->kvm, &info->track_node);
        kvmgt_protect_table_destroy(info);
        gvt_cache_destroy(info->vgpu);