Commit 8b5eae13 authored by Scott Jiang's avatar Scott Jiang Committed by Mark Brown

ASoC: bfin: fix memory leak in sport3 controller driver

Signed-off-by: default avatarScott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 0d624275
...@@ -413,7 +413,14 @@ EXPORT_SYMBOL(sport_create); ...@@ -413,7 +413,14 @@ EXPORT_SYMBOL(sport_create);
void sport_delete(struct sport_device *sport) void sport_delete(struct sport_device *sport)
{ {
if (sport->tx_desc)
dma_free_coherent(NULL, sport->tx_desc_size,
sport->tx_desc, 0);
if (sport->rx_desc)
dma_free_coherent(NULL, sport->rx_desc_size,
sport->rx_desc, 0);
sport_free_resource(sport); sport_free_resource(sport);
kfree(sport);
} }
EXPORT_SYMBOL(sport_delete); EXPORT_SYMBOL(sport_delete);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment