Staging: comedi: usbduxfast: balance semaphores up/down in attach error path

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Cc: Bernd Porr <BerndPorr@f2s.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: David Schleef <ds@schleef.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Mariusz Kozlowski 2009-03-03 19:38:33 +01:00 committed by Greg Kroah-Hartman
parent 3944969427
commit e57795a1a7
1 changed files with 1 additions and 0 deletions

View File

@ -1766,6 +1766,7 @@ static int usbduxfast_attach(comedi_device *dev, comedi_devconfig *it)
if (ret < 0) { if (ret < 0) {
printk(KERN_ERR "comedi%d: usbduxfast: error alloc space for " printk(KERN_ERR "comedi%d: usbduxfast: error alloc space for "
"subdev\n", dev->minor); "subdev\n", dev->minor);
up(&(usbduxfastsub[index].sem));
up(&start_stop_sem); up(&start_stop_sem);
return ret; return ret;
} }