From: H Hartley Sweeten Date: Thu, 23 May 2013 19:55:28 +0000 (-0700) Subject: staging: comedi: usbduxsigma: remove tidy_up() from (*auto_attach) X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1fc56e86e49c93e426937377fc485734a81870da;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: comedi: usbduxsigma: remove tidy_up() from (*auto_attach) 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c b/drivers/staging/comedi/drivers/usbduxsigma.c index bdbcc4843c2f..b879965565ad 100644 --- a/drivers/staging/comedi/drivers/usbduxsigma.c +++ b/drivers/staging/comedi/drivers/usbduxsigma.c @@ -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);