mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 22:51:35 +00:00
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>
This commit is contained in:
parent
a2b07fa7b9
commit
2eb398df77
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user