[patch] add some unlocks on error paths irq_comm.c

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

 



There were a couple unlocks missing.  They were found by smatch static 
checker.  Compile tested.

regards,
dan carpenter

Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>

--- orig/virt/kvm/irq_comm.c	2009-11-08 19:00:50.000000000 +0200
+++ devel/virt/kvm/irq_comm.c	2009-11-08 19:04:45.000000000 +0200
@@ -209,6 +209,7 @@
 				sizeof(kvm->arch.irq_sources_bitmap));
 
 	if (irq_source_id >= sizeof(kvm->arch.irq_sources_bitmap)) {
+		mutex_unlock(&kvm->irq_lock);
 		printk(KERN_WARNING "kvm: exhaust allocatable IRQ sources!\n");
 		return -EFAULT;
 	}
@@ -229,6 +230,7 @@
 	mutex_lock(&kvm->irq_lock);
 	if (irq_source_id < 0 ||
 	    irq_source_id >= sizeof(kvm->arch.irq_sources_bitmap)) {
+		mutex_unlock(&kvm->irq_lock);
 		printk(KERN_ERR "kvm: IRQ source ID out of range!\n");
 		return;
 	}
--
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