Skip to content

Commit 2eb398d

Browse files
ye xingchensean-jc
authored andcommitted
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: 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>
1 parent a2b07fa commit 2eb398d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/x86.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12274,7 +12274,7 @@ void __user * __x86_set_memory_region(struct kvm *kvm, int id, gpa_t gpa,
1227412274
*/
1227512275
hva = vm_mmap(NULL, 0, size, PROT_READ | PROT_WRITE,
1227612276
MAP_SHARED | MAP_ANONYMOUS, 0);
12277-
if (IS_ERR((void *)hva))
12277+
if (IS_ERR_VALUE(hva))
1227812278
return (void __user *)hva;
1227912279
} else {
1228012280
if (!slot || !slot->npages)

0 commit comments

Comments
 (0)