diff mbox

[v2] KVM: x86: Fix uninitialized return code

Message ID 50BB279E.1090105@web.de (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Kiszka Dec. 2, 2012, 10:04 a.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

This is a regression caused by 18595411a7.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Sorry, copy&pasted wrong error code.

 arch/x86/kvm/x86.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Gleb Natapov Dec. 2, 2012, 3:38 p.m. UTC | #1
On Sun, Dec 02, 2012 at 11:04:14AM +0100, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> This is a regression caused by 18595411a7.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

Applied, thanks.

> ---
> 
> Sorry, copy&pasted wrong error code.
> 
>  arch/x86/kvm/x86.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index b0b8abe..3bdaf29 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -3006,6 +3006,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
>  		break;
>  	}
>  	case KVM_SET_LAPIC: {
> +		r = -EINVAL;
>  		if (!vcpu->arch.apic)
>  			goto out;
>  		u.lapic = memdup_user(argp, sizeof(*u.lapic));
> -- 
> 1.7.3.4

--
			Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index b0b8abe..3bdaf29 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3006,6 +3006,7 @@  long kvm_arch_vcpu_ioctl(struct file *filp,
 		break;
 	}
 	case KVM_SET_LAPIC: {
+		r = -EINVAL;
 		if (!vcpu->arch.apic)
 			goto out;
 		u.lapic = memdup_user(argp, sizeof(*u.lapic));