summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorMuhammad Usama Anjum <musamaanjum@gmail.com>2021-03-05 21:08:16 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2021-03-06 12:18:39 +0300
commit4691453406c3a799fdebac83a689919c2c877f04 (patch)
treeeb372d24d1e23a6a9405c009dc6e8a7ad8e88702 /arch/x86/kvm/x86.c
parent99840a75454b66d69d2a450ab04e6438d75eba48 (diff)
downloadlinux-4691453406c3a799fdebac83a689919c2c877f04.tar.xz
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>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 868213ca4f98..46b0e52671bb 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;