diff options
author | Scott Jiang <scott.jiang.linux@gmail.com> | 2012-08-10 00:08:40 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-08-09 15:08:59 +0200 |
commit | 8b5eae137b91cb2db15fe2c5a913cafde4629339 (patch) | |
tree | f5bb10a248f6367253afcaa027aea3f30da5758a | |
parent | ASoC: Davinci: McASP: Flush the FIFO before enabling (diff) | |
download | linux-8b5eae137b91cb2db15fe2c5a913cafde4629339.tar.xz linux-8b5eae137b91cb2db15fe2c5a913cafde4629339.zip |
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>
-rw-r--r-- | sound/soc/blackfin/bf6xx-sport.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/blackfin/bf6xx-sport.c b/sound/soc/blackfin/bf6xx-sport.c index 318c5ba5360f..dfb744381c42 100644 --- a/sound/soc/blackfin/bf6xx-sport.c +++ b/sound/soc/blackfin/bf6xx-sport.c @@ -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); |