]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: usbduxsigma: remove tidy_up() from (*auto_attach)
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 23 May 2013 19:55:28 +0000 (12:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2013 11:40:57 +0000 (20:40 +0900)
Comedi drivers do not need to cleanup allocations during the
(*auto_attach). If the (*auto_attach) fails the (*detach) will
automatically be called to handle the cleanup.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/usbduxsigma.c

index bdbcc4843c2fda3f1f46d77a5877ef6745278566..b879965565adea1e3152900182aeedf456fb649d 100644 (file)
@@ -1834,10 +1834,8 @@ static int usbduxsigma_auto_attach(struct comedi_device *dev,
        }
 
        ret = usbduxsigma_alloc_usb_buffers(dev);
-       if (ret) {
-               tidy_up(devpriv);
+       if (ret)
                return ret;
-       }
 
        ret = comedi_load_firmware(dev, &usb->dev, FIRMWARE,
                                   usbduxsigma_firmware_upload, 0);