aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorScott Jiang <scott.jiang.linux@gmail.com>2012-08-09 18:08:40 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-08-09 09:08:59 -0400
commit8b5eae137b91cb2db15fe2c5a913cafde4629339 (patch)
treef5bb10a248f6367253afcaa027aea3f30da5758a /sound
parent0d624275720a4b01217693eb80d967a0d5f1f3a3 (diff)
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/blackfin/bf6xx-sport.c7
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);
413 413
414void sport_delete(struct sport_device *sport) 414void sport_delete(struct sport_device *sport)
415{ 415{
416 if (sport->tx_desc)
417 dma_free_coherent(NULL, sport->tx_desc_size,
418 sport->tx_desc, 0);
419 if (sport->rx_desc)
420 dma_free_coherent(NULL, sport->rx_desc_size,
421 sport->rx_desc, 0);
416 sport_free_resource(sport); 422 sport_free_resource(sport);
423 kfree(sport);
417} 424}
418EXPORT_SYMBOL(sport_delete); 425EXPORT_SYMBOL(sport_delete);
419 426