From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUfcE-0003fP-B7 for qemu-devel@nongnu.org; Tue, 23 Apr 2013 11:58:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUfc8-0006bO-0G for qemu-devel@nongnu.org; Tue, 23 Apr 2013 11:58:46 -0400 Received: from 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:1d0::1]:56758 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUfc7-0006b9-Q7 for qemu-devel@nongnu.org; Tue, 23 Apr 2013 11:58:39 -0400 From: Peter Maydell Date: Tue, 23 Apr 2013 16:58:37 +0100 Message-Id: <1366732717-19657-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] target-arm: Fix incorrect check of kvm_vcpu_ioctl return value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org kvm_vcpu_ioctl() returns -ETHING on error, not ETHING -- correct an incorrect check in kvm_arch_init_vcpu(). This would not have had any significant ill-effects -- we would just have propagated the less useful ENOENT up to the caller rather than the more accurate EINVAL in the unlikely case that the kernel didn't have VFP-D32 support. Signed-off-by: Peter Maydell --- Pretty trivial bugfix, noticed while I was doing something to the code in this area... target-arm/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-arm/kvm.c b/target-arm/kvm.c index d8acace..b7bdc03 100644 --- a/target-arm/kvm.c +++ b/target-arm/kvm.c @@ -62,8 +62,8 @@ int kvm_arch_init_vcpu(CPUState *cs) r.id = KVM_REG_ARM | KVM_REG_SIZE_U64 | KVM_REG_ARM_VFP | 31; r.addr = (uintptr_t)(&v); ret = kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, &r); - if (ret == ENOENT) { - return EINVAL; + if (ret == -ENOENT) { + return -EINVAL; } return ret; } -- 1.7.9.5