From: Thierry Reding <thierry.reding@gmail.com>
To: Lin Huang <hl@rock-chips.com>
Cc: heiko@sntech.de, mark.yao@rock-chips.com,
myungjoo.ham@samsung.com, mturquette@baylibre.com,
sboyd@codeaurora.org, linux-clk@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, airlied@linux.ie,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
kyungmin.park@samsung.com, dianders@chromium.org,
dbasehore@chromium.org, huangtao@rock-chips.com,
typ@rock-chips.com
Subject: Re: [RFC PATCH v1 4/6] PM / devfreq: event: support rockchip dfi controller
Date: Fri, 3 Jun 2016 18:54:26 +0200 [thread overview]
Message-ID: <20160603165426.GC21013@ulmo.ba.sec> (raw)
In-Reply-To: <1464947719-6245-5-git-send-email-hl@rock-chips.com>
[-- Attachment #1: Type: text/plain, Size: 529 bytes --]
On Fri, Jun 03, 2016 at 05:55:17PM +0800, Lin Huang wrote:
[...]
> + ret = clk_prepare_enable(data->clk);
> + if (ret) {
> + dev_err(&pdev->dev, "failed to enable clk: %d\n", ret);
> + clk_disable_unprepare(data->clk);
> + return ret;
> + }
This is going to give you a large WARN. clk_prepare_enable() already
leaves the clock in a proper state when it fails (i.e. it calls
clk_unprepare() if the clk_enable() part failed), so calling
clk_disable_unprepare() upon failure is going to unbalance the
reference counts.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-06-03 16:54 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-03 9:55 [RFC PATCH v1 0/6] rk3399 support ddr frequency scaling Lin Huang
2016-06-03 9:55 ` [RFC PATCH v1 1/6] rockchip: rockchip: add new clock-type for the ddrclk Lin Huang
2016-06-03 12:29 ` Shawn Lin
2016-06-06 2:24 ` hl
2016-06-03 12:51 ` Heiko Stübner
2016-06-06 3:20 ` hl
2016-06-06 3:20 ` hl
2016-06-03 9:55 ` [RFC PATCH v1 2/6] clk: rockchip: rk3399: add SCLK_DDRCLK ID for ddrc Lin Huang
2016-06-03 12:34 ` Shawn Lin
2016-06-03 12:36 ` Heiko Stübner
2016-06-03 12:47 ` Shawn Lin
2016-06-03 13:25 ` Doug Anderson
2016-06-03 9:55 ` [RFC PATCH v1 3/6] clk: rockchip: rk3399: add ddrc clock support Lin Huang
2016-06-03 12:56 ` Heiko Stübner
2016-06-06 3:25 ` hl
2016-06-03 9:55 ` [RFC PATCH v1 4/6] PM / devfreq: event: support rockchip dfi controller Lin Huang
2016-06-03 10:26 ` Chanwoo Choi
2016-06-06 3:50 ` hl
2016-06-03 16:54 ` Thierry Reding [this message]
2016-06-06 6:19 ` hl
2016-06-03 9:55 ` [RFC PATCH v1 5/6] PM / devfreq: rockchip: add devfreq driver for rk3399 dmc Lin Huang
2016-06-03 9:55 ` [RFC PATCH v1 6/6] drm/rockchip: Add dmc notifier in vop driver Lin Huang
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=20160603165426.GC21013@ulmo.ba.sec \
--to=thierry.reding@gmail.com \
--cc=airlied@linux.ie \
--cc=dbasehore@chromium.org \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hl@rock-chips.com \
--cc=huangtao@rock-chips.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mark.yao@rock-chips.com \
--cc=mturquette@baylibre.com \
--cc=myungjoo.ham@samsung.com \
--cc=sboyd@codeaurora.org \
--cc=typ@rock-chips.com \
/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