summaryrefslogtreecommitdiffstats
path: root/drivers/dma/dmaengine.c
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2010-01-26 10:26:06 +0100
committerDan Williams <dan.j.williams@intel.com>2010-02-02 14:58:37 -0700
commitadef477268ff5ddd0195611dc7e26d7a879fefe1 (patch)
treead7b36a817f5f045719b28ade67914a2ce775d5c /drivers/dma/dmaengine.c
parentabe94c756c08d50566c09a65b9c7fe72f83071c5 (diff)
downloadtalos-obmc-linux-adef477268ff5ddd0195611dc7e26d7a879fefe1.tar.gz
talos-obmc-linux-adef477268ff5ddd0195611dc7e26d7a879fefe1.zip
dmaengine: fix memleak in dma_async_device_unregister
While debugging a dma driver I noticed a memleak after unloading the driver module. Caught by kmemleak. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/dmaengine.c')
-rw-r--r--drivers/dma/dmaengine.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 6f51a0a7a8bb..e7a3230fb7d5 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -826,6 +826,7 @@ void dma_async_device_unregister(struct dma_device *device)
chan->dev->chan = NULL;
mutex_unlock(&dma_list_mutex);
device_unregister(&chan->dev->device);
+ free_percpu(chan->local);
}
}
EXPORT_SYMBOL(dma_async_device_unregister);
OpenPOWER on IntegriCloud