diff options
author | Dan Carpenter <error27@gmail.com> | 2011-06-30 12:02:05 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-07-05 09:24:18 -0700 |
commit | 85678d5d27cb0ea1005316f51b1b062bf4609b66 (patch) | |
tree | 2634392da402720765b5c107676536f9bd96072f /drivers/staging/comedi | |
parent | 880e96166c2cd1d84df0ccb02d413dcbf422796b (diff) |
Staging: comedi: usbdux: release locks on error paths
Smatch complains about a couple error paths where the semaphores
were not released.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/drivers/usbdux.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c index 6637698e119..bf62e0dd6f6 100644 --- a/drivers/staging/comedi/drivers/usbdux.c +++ b/drivers/staging/comedi/drivers/usbdux.c @@ -1465,6 +1465,7 @@ static int usbdux_ao_inttrig(struct comedi_device *dev, dev_err(&this_usbduxsub->interface->dev, "comedi%d: usbdux_ao_inttrig: invalid trignum\n", dev->minor); + up(&this_usbduxsub->sem); return -EINVAL; } if (!(this_usbduxsub->ao_cmd_running)) { @@ -2671,6 +2672,7 @@ static int usbdux_attach(struct comedi_device *dev, struct comedi_devconfig *it) if (ret < 0) { dev_err(&udev->interface->dev, "comedi%d: error alloc space for subdev\n", dev->minor); + up(&udev->sem); up(&start_stop_sem); return ret; } |