From: Scott Jiang <scott.jiang.linux@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
alsa-devel@alsa-project.org,
uclinux-dist-devel@blackfin.uclinux.org
Cc: Scott Jiang <scott.jiang.linux@gmail.com>
Subject: [PATCH 2/2] ASoC: bfin: fix memory leak in sport3 controller driver
Date: Thu, 9 Aug 2012 18:08:40 -0400 [thread overview]
Message-ID: <1344550120-30901-2-git-send-email-scott.jiang.linux@gmail.com> (raw)
In-Reply-To: <1344550120-30901-1-git-send-email-scott.jiang.linux@gmail.com>
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
---
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 318c5ba..dfb7443 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);
--
1.7.0.4
next prev parent reply other threads:[~2012-08-09 9:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-09 22:08 [PATCH 1/2] ASoC: ad1836: convert to use snd_soc_register_card Scott Jiang
2012-08-09 13:08 ` Mark Brown
2012-08-09 22:08 ` Scott Jiang [this message]
2012-08-09 13:09 ` [PATCH 2/2] ASoC: bfin: fix memory leak in sport3 controller driver Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1344550120-30901-2-git-send-email-scott.jiang.linux@gmail.com \
--to=scott.jiang.linux@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=uclinux-dist-devel@blackfin.uclinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).