Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85678d5d authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

Staging: comedi: usbdux: release locks on error paths



Smatch complains about a couple error paths where the semaphores
were not released.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 880e9616
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
	}