Received: from eggs.gnu.org ([208.118.235.92]:48646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYKfh-0003up-SG for qemu-devel@nongnu.org; Fri, 03 May 2013 14:25:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYKff-0000s5-Hd for qemu-devel@nongnu.org; Fri, 03 May 2013 14:25:29 -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]:56792 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYKff-0000ry-BD for qemu-devel@nongnu.org; Fri, 03 May 2013 14:25:27 -0400 From: Peter Maydell Date: Fri, 3 May 2013 18:58:03 +0100 Message-Id: <1367603883-5205-2-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1367603883-5205-1-git-send-email-peter.maydell@linaro.org> References: <1367603883-5205-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PULL 1/1] target-arm: Fix incorrect check of kvm_vcpu_ioctl return value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno , Blue Swirl Cc: Anthony Liguori , qemu-devel@nongnu.org, Paul Brook 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 --- 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