aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r--drivers/kvm/kvm_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index bf35457ce377..3c3231d8dabf 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -970,7 +970,7 @@ EXPORT_SYMBOL_GPL(gfn_to_page);
970void mark_page_dirty(struct kvm *kvm, gfn_t gfn) 970void mark_page_dirty(struct kvm *kvm, gfn_t gfn)
971{ 971{
972 int i; 972 int i;
973 struct kvm_memory_slot *memslot = NULL; 973 struct kvm_memory_slot *memslot;
974 unsigned long rel_gfn; 974 unsigned long rel_gfn;
975 975
976 for (i = 0; i < kvm->nmemslots; ++i) { 976 for (i = 0; i < kvm->nmemslots; ++i) {
@@ -979,7 +979,7 @@ void mark_page_dirty(struct kvm *kvm, gfn_t gfn)
979 if (gfn >= memslot->base_gfn 979 if (gfn >= memslot->base_gfn
980 && gfn < memslot->base_gfn + memslot->npages) { 980 && gfn < memslot->base_gfn + memslot->npages) {
981 981
982 if (!memslot || !memslot->dirty_bitmap) 982 if (!memslot->dirty_bitmap)
983 return; 983 return;
984 984
985 rel_gfn = gfn - memslot->base_gfn; 985 rel_gfn = gfn - memslot->base_gfn;