From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clkdev: Fix leak in devm_clk_put()
Date: Tue, 5 Jun 2012 11:44:45 +0100 [thread overview]
Message-ID: <1338893085-12376-1-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
Surprisingly devres_destroy() doesn't call the destructor for the resource
it is destroying, causing devm_clk_put() to be ineffectual.
Use the newly added devres_release() instead to fix this.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/clk/clkdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
index c535cf8..c7a4eee 100644
--- a/drivers/clk/clkdev.c
+++ b/drivers/clk/clkdev.c
@@ -133,7 +133,7 @@ void devm_clk_put(struct device *dev, struct clk *clk)
{
int ret;
- ret = devres_destroy(dev, devm_clk_release, devm_clk_match, clk);
+ ret = devres_release(dev, devm_clk_release, devm_clk_match, clk);
WARN_ON(ret);
}
--
1.7.10
reply other threads:[~2012-06-05 10:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1338893085-12376-1-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=linux-arm-kernel@lists.infradead.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).