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>
This commit is contained in:
committed by
Dan Williams
parent
abe94c756c
commit
adef477268
@@ -826,6 +826,7 @@ void dma_async_device_unregister(struct dma_device *device)
|
|||||||
chan->dev->chan = NULL;
|
chan->dev->chan = NULL;
|
||||||
mutex_unlock(&dma_list_mutex);
|
mutex_unlock(&dma_list_mutex);
|
||||||
device_unregister(&chan->dev->device);
|
device_unregister(&chan->dev->device);
|
||||||
|
free_percpu(chan->local);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(dma_async_device_unregister);
|
EXPORT_SYMBOL(dma_async_device_unregister);
|
||||||
|
Reference in New Issue
Block a user