summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gvt/kvmgt.c
diff options
context:
space:
mode:
authorJike Song <jike.song@intel.com>2016-12-16 05:51:07 +0300
committerZhenyu Wang <zhenyuw@linux.intel.com>2016-12-26 04:45:29 +0300
commit8ff842fd9eab69f8cf99fdd21ce25a5a0411473e (patch)
tree08a79b391b872c5c22416d241468f14ab8884958 /drivers/gpu/drm/i915/gvt/kvmgt.c
parent364fb6b789ffce44c1b5429086c47b0df6c36aff (diff)
downloadlinux-8ff842fd9eab69f8cf99fdd21ce25a5a0411473e.tar.xz
drm/i915/gvt/kvmgt: trival: code cleanup
Don't introduce local variables unless necessary. Signed-off-by: Jike Song <jike.song@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/kvmgt.c')
-rw-r--r--drivers/gpu/drm/i915/gvt/kvmgt.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c
index efb01435f13f..934963970288 100644
--- a/drivers/gpu/drm/i915/gvt/kvmgt.c
+++ b/drivers/gpu/drm/i915/gvt/kvmgt.c
@@ -555,6 +555,7 @@ static void intel_vgpu_release_work(struct work_struct *work)
{
struct intel_vgpu *vgpu = container_of(work, struct intel_vgpu,
vdev.release_work);
+
__intel_vgpu_release(vgpu);
}
@@ -1340,18 +1341,14 @@ static int kvmgt_guest_init(struct mdev_device *mdev)
static bool kvmgt_guest_exit(struct kvmgt_guest_info *info)
{
- struct intel_vgpu *vgpu;
-
if (!info) {
gvt_err("kvmgt_guest_info invalid\n");
return false;
}
- vgpu = info->vgpu;
-
kvm_page_track_unregister_notifier(info->kvm, &info->track_node);
kvmgt_protect_table_destroy(info);
- gvt_cache_destroy(vgpu);
+ gvt_cache_destroy(info->vgpu);
vfree(info);
return true;