]> err.no Git - linux-2.6/commitdiff
KVM: Remove unnecessary initialization and checks in mark_page_dirty()
authorNguyen Anh Quynh <aquynh@gmail.com>
Tue, 5 Jun 2007 07:35:19 +0000 (10:35 +0300)
committerAvi Kivity <avi@qumranet.com>
Mon, 16 Jul 2007 09:05:45 +0000 (12:05 +0300)
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/kvm_main.c

index bf35457ce3778c56a1f9cba42813c444e98cb923..3c3231d8dabfdb5a4f8b6ee8323e504fdb5a8ab2 100644 (file)
@@ -970,7 +970,7 @@ EXPORT_SYMBOL_GPL(gfn_to_page);
 void mark_page_dirty(struct kvm *kvm, gfn_t gfn)
 {
        int i;
-       struct kvm_memory_slot *memslot = NULL;
+       struct kvm_memory_slot *memslot;
        unsigned long rel_gfn;
 
        for (i = 0; i < kvm->nmemslots; ++i) {
@@ -979,7 +979,7 @@ void mark_page_dirty(struct kvm *kvm, gfn_t gfn)
                if (gfn >= memslot->base_gfn
                    && gfn < memslot->base_gfn + memslot->npages) {
 
-                       if (!memslot || !memslot->dirty_bitmap)
+                       if (!memslot->dirty_bitmap)
                                return;
 
                        rel_gfn = gfn - memslot->base_gfn;