Skip to content

Commit

Permalink
iop-adma: let devm do its job, don't duplicate free
Browse files Browse the repository at this point in the history
No need to free stuff that the devm infrastructure will take care of...

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
Dan Williams committed Jan 6, 2009
1 parent 7dd6025 commit f388220
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions drivers/dma/iop-adma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1113,26 +1113,13 @@ static int __devexit iop_adma_remove(struct platform_device *dev)
struct iop_adma_device *device = platform_get_drvdata(dev);
struct dma_chan *chan, *_chan;
struct iop_adma_chan *iop_chan;
int i;
struct iop_adma_platform_data *plat_data = dev->dev.platform_data;

dma_async_device_unregister(&device->common);

for (i = 0; i < 3; i++) {
unsigned int irq;
irq = platform_get_irq(dev, i);
free_irq(irq, device);
}

dma_free_coherent(&dev->dev, plat_data->pool_size,
device->dma_desc_pool_virt, device->dma_desc_pool);

do {
struct resource *res;
res = platform_get_resource(dev, IORESOURCE_MEM, 0);
release_mem_region(res->start, res->end - res->start);
} while (0);

list_for_each_entry_safe(chan, _chan, &device->common.channels,
device_node) {
iop_chan = to_iop_adma_chan(chan);
Expand Down

0 comments on commit f388220

Please sign in to comment.