Commit 2eb398df authored by ye xingchen's avatar ye xingchen Committed by Sean Christopherson
Browse files

KVM: x86: Replace IS_ERR() with IS_ERR_VALUE()



Avoid type casts that are needed for IS_ERR() and use
IS_ERR_VALUE() instead.

Signed-off-by: default avatarye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202211161718436948912@zte.com.cn


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent a2b07fa7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)