diff mbox series

[linux-next] KVM: x86: Replace IS_ERR() with IS_ERR_VALUE()

Message ID 202211161718436948912@zte.com.cn (mailing list archive)
State New, archived
Headers show
Series [linux-next] KVM: x86: Replace IS_ERR() with IS_ERR_VALUE() | expand

Commit Message

ye.xingchen@zte.com.cn Nov. 16, 2022, 9:18 a.m. UTC
From: ye xingchen <ye.xingchen@zte.com.cn>

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>
---
 arch/x86/kvm/x86.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sean Christopherson Jan. 28, 2023, 12:05 a.m. UTC | #1
On Wed, 16 Nov 2022 17:18:43 +0800, ye.xingchen@zte.com.cn wrote:
> Avoid type casts that are needed for IS_ERR() and use
> IS_ERR_VALUE() instead.
> 
> 

Applied to kvm-x86 misc, thanks!

[1/1] KVM: x86: Replace IS_ERR() with IS_ERR_VALUE()
      https://github.com/kvm-x86/linux/commit/2eb398df77a1

--
https://github.com/kvm-x86/linux/tree/next
https://github.com/kvm-x86/linux/tree/fixes
diff mbox series

Patch

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index aa39e6c2d1f1..c2eaa9b8d2cb 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -12483,7 +12483,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)