ASoC: bfin: fix memory leak in sport3 controller driver
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Родитель
0d62427572
Коммит
8b5eae137b
|
@ -413,7 +413,14 @@ EXPORT_SYMBOL(sport_create);
|
|||
|
||||
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);
|
||||
kfree(sport);
|
||||
}
|
||||
EXPORT_SYMBOL(sport_delete);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче