kvm: x86: use NULL instead of using plain integer as pointer

Sparse warnings removed:
warning: Using plain integer as NULL pointer

Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com>
Message-Id: <20210305180816.GA488770@LEGION>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Muhammad Usama Anjum 2021-03-05 23:08:16 +05:00 committed by Paolo Bonzini
parent 99840a7545
commit 4691453406

View File

@ -10600,7 +10600,7 @@ void __user * __x86_set_memory_region(struct kvm *kvm, int id, gpa_t gpa,
return (void __user *)hva;
} else {
if (!slot || !slot->npages)
return 0;
return NULL;
old_npages = slot->npages;
hva = slot->userspace_addr;