KVM: x86: Replace IS_ERR() with IS_ERR_VALUE()
authorye xingchen <ye.xingchen@zte.com.cn>
Wed, 16 Nov 2022 09:18:43 +0000 (17:18 +0800)
committerSean Christopherson <seanjc@google.com>
Tue, 24 Jan 2023 18:42:09 +0000 (10:42 -0800)
Avoid type casts that are needed for IS_ERR() and use
IS_ERR_VALUE() instead.

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202211161718436948912@zte.com.cn
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/x86.c

index 65b401e94cec8c9ee51b10f308774ea3384f5427..d7d5bca00294fb1328f5c0af7d3b77ddc5dbd30b 100644 (file)
@@ -12274,7 +12274,7 @@ void __user * __x86_set_memory_region(struct kvm *kvm, int id, gpa_t gpa,
                 */
                hva = vm_mmap(NULL, 0, size, PROT_READ | PROT_WRITE,
                              MAP_SHARED | MAP_ANONYMOUS, 0);
-               if (IS_ERR((void *)hva))
+               if (IS_ERR_VALUE(hva))
                        return (void __user *)hva;
        } else {
                if (!slot || !slot->npages)