Re: [PATCH 03/16] ARM: KVM: fix error path for vgic/timer hyp init

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

 



On 13/12/12 21:51, Christoffer Dall wrote:
> 
> 
> On Thursday, December 6, 2012, Marc Zyngier wrote:
> 
>     Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx <javascript:;>>
>     ---
>      arch/arm/kvm/arm.c | 8 +++++---
>      1 file changed, 5 insertions(+), 3 deletions(-)
> 
>     diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
>     index ff5feef..5dcc740 100644
>     --- a/arch/arm/kvm/arm.c
>     +++ b/arch/arm/kvm/arm.c
>     @@ -1083,15 +1083,17 @@ static int init_hyp_mode(void)
>              * Init HYP view of VGIC
>              */
>             err = kvm_vgic_hyp_init();
>     -       if (!err)
>     -               vgic_present = true;
>     +       if (err)
>     +               goto out_free_vfp;
>     +
>     +       vgic_present = true;
> 
> 
> this is a bit weird when !defined(CONFIG_KVM_ARM_VGIC).
> 
> I would make this single assignment conditional on the config setting
> and get rid of the ifdef's in the remainder of this file.

Ah, that's an interesting approach. I'll update the patch.

> 
> 
>             /*
>              * Init HYP architected timer support
>              */
>             err = kvm_timer_hyp_init();
>             if (err)
>     -               goto out_free_mappings;
>     +               goto out_free_vfp;
> 
>             return 0;
>      out_free_vfp:
>     --
>     1.8.0.1
> 
> 
> 
>     _______________________________________________
>     kvmarm mailing list
>     kvmarm@xxxxxxxxxxxxxxxxxxxxx <javascript:;>
>     https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm
> 


-- 
Jazz is not dead. It just smells funny...


_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm


[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux