Re: [PATCH] KVM: VMX: Add missing braces to avoid redundant error check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 08, 2013 at 11:07:46AM +0200, Jan Kiszka wrote:
> The code was already properly aligned, now also add the braces to avoid
Are you saying kvm is not written in Python?

> that err is checked even if alloc_apic_access_page didn't run and change
> it. Found via Coccinelle by Fengguang Wu.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
Applied, thanks.

> ---
>  arch/x86/kvm/vmx.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index cf1aa8f..656b0fa 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -6797,10 +6797,11 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id)
>  	put_cpu();
>  	if (err)
>  		goto free_vmcs;
> -	if (vm_need_virtualize_apic_accesses(kvm))
> +	if (vm_need_virtualize_apic_accesses(kvm)) {
>  		err = alloc_apic_access_page(kvm);
>  		if (err)
>  			goto free_vmcs;
> +	}
>  
>  	if (enable_ept) {
>  		if (!kvm->arch.ept_identity_map_addr)
> -- 
> 1.7.3.4

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




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux