Skip to content

Commit

Permalink
ASoC: bfin: fix memory leak in sport3 controller driver
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Scott Jiang authored and Mark Brown committed Aug 9, 2012
1 parent 0d62427 commit 8b5eae1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sound/soc/blackfin/bf6xx-sport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 8b5eae1

Please sign in to comment.