lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201207181904.57308.hartleys@visionengravers.com>
Date:	Wed, 18 Jul 2012 19:04:56 -0700
From:	H Hartley Sweeten <hartleys@...ionengravers.com>
To:	Linux Kernel <linux-kernel@...r.kernel.org>
CC:	<devel@...verdev.osuosl.org>, <abbotti@....co.uk>,
	<gregkh@...uxfoundation.org>
Subject: [PATCH 87/90] staging: comedi: rtd520: remove the '#if 0' code in the attach

This driver has code #if 0'ed out that would allow cleaning up
the attach if there was an error. The comedi core currently
calls the detach function to do this if the attach fails.

Remove the #if 0'ed out code.

Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
Cc: Ian Abbott <abbotti@....co.uk>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
 drivers/staging/comedi/drivers/rtd520.c | 46 ---------------------------------
 1 file changed, 46 deletions(-)

diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c
index aeccae9..d1753e2 100644
--- a/drivers/staging/comedi/drivers/rtd520.c
+++ b/drivers/staging/comedi/drivers/rtd520.c
@@ -1886,52 +1886,6 @@ static int rtd_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 	printk("\ncomedi%d: rtd520 driver attached.\n", dev->minor);
 
 	return 1;
-
-#if 0
-	/* hit an error, clean up memory and return ret */
-/* rtd_attach_die_error: */
-#ifdef USE_DMA
-	for (index = 0; index < DMA_CHAIN_COUNT; index++) {
-		if (NULL != devpriv->dma0Buff[index]) {	/* free buffer memory */
-			pci_free_consistent(devpriv->pci_dev,
-					    sizeof(u16) * devpriv->fifoLen / 2,
-					    devpriv->dma0Buff[index],
-					    devpriv->dma0BuffPhysAddr[index]);
-			devpriv->dma0Buff[index] = NULL;
-		}
-	}
-	if (NULL != devpriv->dma0Chain) {
-		pci_free_consistent(devpriv->pci_dev,
-				    sizeof(struct plx_dma_desc)
-				    * DMA_CHAIN_COUNT,
-				    devpriv->dma0Chain,
-				    devpriv->dma0ChainPhysAddr);
-		devpriv->dma0Chain = NULL;
-	}
-#endif /* USE_DMA */
-	/* subdevices and priv are freed by the core */
-	if (dev->irq) {
-		writel(readl(devpriv->lcfg + LCFG_ITCSR) &
-			~(ICS_PLIE | ICS_DMA0_E | ICS_DMA1_E),
-			devpriv->lcfg + LCFG_ITCSR);
-		free_irq(dev->irq, dev);
-	}
-
-	/* release all regions that were allocated */
-	if (devpriv->las0)
-		iounmap(devpriv->las0);
-
-	if (devpriv->las1)
-		iounmap(devpriv->las1);
-
-	if (devpriv->lcfg)
-		iounmap(devpriv->lcfg);
-
-	if (devpriv->pci_dev)
-		pci_dev_put(devpriv->pci_dev);
-
-	return ret;
-#endif
 }
 
 static void rtd_detach(struct comedi_device *dev)
-- 
1.7.11

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ