Staging: comedi: usbduxfast: balance semaphores up/down in attach error path
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>
Tue, 3 Mar 2009 18:38:33 +0000 (19:38 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Apr 2009 21:53:53 +0000 (14:53 -0700)
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>
drivers/staging/comedi/drivers/usbduxfast.c

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