When the vgic_vcpu maps alloc failed, it will be better goto out branch and destroy the vGIC, than just break the loop. Signed-off-by: wanghaibin <wanghaibin.wang@xxxxxxxxxx> --- virt/kvm/arm/vgic.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c index 57e45ff..d411551 100644 --- a/virt/kvm/arm/vgic.c +++ b/virt/kvm/arm/vgic.c @@ -1863,7 +1863,7 @@ static int vgic_init_maps(struct kvm *kvm) ret = vgic_vcpu_init_maps(vcpu, nr_irqs); if (ret) { kvm_err("VGIC: Failed to allocate vcpu memory\n"); - break; + goto out; } } -- 1.7.1 _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm