From: Ian Abbott Date: Wed, 30 Nov 2011 14:59:33 +0000 (+0000) Subject: usbdux: unlock on error in usbdux_ao_inttrig() X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e98a40ed472e4476ab10053db59c54aedb5951f2;p=comedi.git 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. --- 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)) {