mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
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:
parent
0d62427572
commit
8b5eae137b
1 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue