Commit 29d0c074 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: usbdux: remove unnecessary tidy_up() calls

If the comedi_driver (*auto_attach) fails, the comedi core will call
the (*detach) function to do any cleanup. It's not necessary to do
the cleanup in the (*auto_attach).
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ef1ee8cf
......@@ -2294,17 +2294,14 @@ static int usbdux_auto_attach(struct comedi_device *dev,
}
ret = usbdux_alloc_usb_buffers(devpriv);
if (ret) {
tidy_up(devpriv);
if (ret)
return ret;
}
/* setting to alternate setting 3: enabling iso ep and bulk ep. */
ret = usb_set_interface(devpriv->usbdev, devpriv->ifnum, 3);
if (ret < 0) {
dev_err(dev->class_dev,
"could not set alternate setting 3 in high speed\n");
tidy_up(devpriv);
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment