missing vgic_unlock_rank in gic_remove_irq_from_guest
authorStefano Stabellini <sstabellini@kernel.org>
Fri, 9 Dec 2016 00:59:28 +0000 (16:59 -0800)
committerStefano Stabellini <sstabellini@kernel.org>
Fri, 9 Dec 2016 19:34:38 +0000 (11:34 -0800)
Add missing vgic_unlock_rank on the error path in
gic_remove_irq_from_guest.

Coverity-ID: 1381843

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/gic.c

index 63c744af8a95252a5192b31036ba02e72e21b290..a5348f237a8aef4ee4e3e19ae0701cb005d5c899 100644 (file)
@@ -205,7 +205,10 @@ int gic_remove_irq_from_guest(struct domain *d, unsigned int virq,
          */
         if ( test_bit(_IRQ_INPROGRESS, &desc->status) ||
              !test_bit(_IRQ_DISABLED, &desc->status) )
+        {
+            vgic_unlock_rank(v_target, rank, flags);
             return -EBUSY;
+        }
     }
 
     clear_bit(_IRQ_GUEST, &desc->status);