Explorar o código

Staging: comedi: unlock on error in usbduxsigma_attach()

We should release the udev->sem lock before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dan Carpenter %!s(int64=13) %!d(string=hai) anos
pai
achega
2f30866fbf
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      drivers/staging/comedi/drivers/usbduxsigma.c

+ 1 - 0
drivers/staging/comedi/drivers/usbduxsigma.c

@@ -2691,6 +2691,7 @@ static int usbduxsigma_attach(struct comedi_device *dev,
 	if (ret < 0) {
 		dev_err(&udev->interface->dev,
 			"comedi%d: no space for subdev\n", dev->minor);
+		up(&udev->sem);
 		up(&start_stop_sem);
 		return ret;
 	}