From: Anatolij Gustschin Date: Tue, 26 Jan 2010 09:26:06 +0000 (+0100) Subject: dmaengine: fix memleak in dma_async_device_unregister X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=adef477268ff5ddd0195611dc7e26d7a879fefe1;p=linux-beck.git 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 Cc: Maciej Sosnowski Signed-off-by: Dan Williams --- 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);