From: Muhammad Usama Anjum Date: Fri, 5 Mar 2021 18:08:16 +0000 (+0500) Subject: kvm: x86: use NULL instead of using plain integer as pointer X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4691453406c3a799fdebac83a689919c2c877f04;p=linux.git 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 Message-Id: <20210305180816.GA488770@LEGION> Signed-off-by: Paolo Bonzini --- diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 868213ca4f984..46b0e52671bb6 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -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;