[PATCH] drm/i915/gvt: remove the redundant info NULL check
Tina Zhang
tina.zhang at intel.com
Fri Mar 24 05:56:54 UTC 2017
The variable info is never NULL, which is checked by the caller. This
patch removes the redundant info NULL check logic.
Signed-off-by: Tina Zhang <tina.zhang at intel.com>
diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c
index d641214..2d92119 100644
--- a/drivers/gpu/drm/i915/gvt/kvmgt.c
+++ b/drivers/gpu/drm/i915/gvt/kvmgt.c
@@ -1340,13 +1340,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);
kvm_put_kvm(info->kvm);
kvmgt_protect_table_destroy(info);
--
2.7.4
More information about the intel-gvt-dev
mailing list