All of lore.kernel.org
 help / color / mirror / Atom feed
From: thierry.reding@gmail.com (Thierry Reding)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: Properly initialize reference count
Date: Thu, 31 Oct 2013 13:02:42 +0100	[thread overview]
Message-ID: <1383220962-26836-1-git-send-email-treding@nvidia.com> (raw)

Commit a336ed7 (clk: Implement clk_unregister()) initializes the kref in
clk_set_parent(), which is obviously the wrong place. Further research
shows that the original patches initialized it correctly, so it probably
ended up in clk_set_parent() by mistake during manual application of the
patch.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/clk/clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 6e3f485..b68a999 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1750,7 +1750,6 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
 	else
 		__clk_recalc_rates(clk, POST_RATE_CHANGE);
 
-	kref_init(&clk->ref);
 out:
 	clk_prepare_unlock();
 
@@ -1906,6 +1905,7 @@ int __clk_init(struct device *dev, struct clk *clk)
 	if (clk->ops->init)
 		clk->ops->init(clk->hw);
 
+	kref_init(&clk->ref);
 out:
 	clk_prepare_unlock();
 
-- 
1.8.4

             reply	other threads:[~2013-10-31 12:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-31 12:02 Thierry Reding [this message]
2013-10-31 19:09 ` [PATCH] clk: Properly initialize reference count Stephen Warren
2013-10-31 19:09   ` Stephen Warren
2013-11-01  9:23   ` Thierry Reding
2013-11-01  9:23     ` Thierry Reding
2013-10-31 20:03 ` Fabio Estevam
2013-11-04  8:47 ` Jonas Jensen

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=1383220962-26836-1-git-send-email-treding@nvidia.com \
    --to=thierry.reding@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.