From e98a40ed472e4476ab10053db59c54aedb5951f2 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Wed, 30 Nov 2011 14:59:33 +0000 Subject: [PATCH] usbdux: unlock on error in usbdux_ao_inttrig() Follow patch by Dan Carpenter to the "staging" sources. When trignum is invalid it returned without unlocking the mutex. Fix it. --- comedi/drivers/usbdux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/comedi/drivers/usbdux.c b/comedi/drivers/usbdux.c index 032877a6..13399711 100644 --- a/comedi/drivers/usbdux.c +++ b/comedi/drivers/usbdux.c @@ -1437,6 +1437,7 @@ static int usbdux_ao_inttrig(comedi_device * dev, comedi_subdevice * s, if (trignum != 0) { printk("comedi%d: usbdux_ao_inttrig: invalid trignum\n", dev->minor); + mutex_unlock(&this_usbduxsub->mutex); return -EINVAL; } if (!(this_usbduxsub->ao_cmd_running)) { -- 2.26.2