From 1d281ad856a6372aa4e2a3eb9fd3d18047bab1de Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Wed, 30 Nov 2011 14:55:06 +0000 Subject: [PATCH] usbduxsigma: 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/usbduxsigma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/comedi/drivers/usbduxsigma.c b/comedi/drivers/usbduxsigma.c index e42d6ec9..3596c1e5 100644 --- a/comedi/drivers/usbduxsigma.c +++ b/comedi/drivers/usbduxsigma.c @@ -1535,6 +1535,7 @@ static int usbdux_ao_inttrig(comedi_device *dev, dev_err(&this_usbduxsub->interface->dev, "comedi%d: usbdux_ao_inttrig: invalid trignum\n", dev->minor); + mutex_unlock(&this_usbduxsub->sem); return -EINVAL; } if (!(this_usbduxsub->ao_cmd_running)) { -- 2.26.2