From: Mariusz Kozlowski Date: Tue, 3 Mar 2009 18:38:33 +0000 (+0100) Subject: Staging: comedi: usbduxfast: balance semaphores up/down in attach error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e57795a1a7ebf8ac91cfb82070cf19bf01ee4ac0;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git Staging: comedi: usbduxfast: balance semaphores up/down in attach error path Signed-off-by: Mariusz Kozlowski Cc: Bernd Porr Cc: Ian Abbott Cc: Frank Mori Hess Cc: David Schleef Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c index a8d64697b40a..95b5807bcd41 100644 --- a/drivers/staging/comedi/drivers/usbduxfast.c +++ b/drivers/staging/comedi/drivers/usbduxfast.c @@ -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; }