public inbox for linux-rockchip@lists.infradead.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Lin Huang <hl-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Cc: huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	typ-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org,
	airlied-cv59FeDIM0c@public.gmane.org,
	mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org,
	dbasehore-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
	myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
	linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	mark.yao-TNX95d0MmH7DzftRWevZcw@public.gmane.org
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-TNX95d0MmH7DzftRWevZcw@public.gmane.org>


[-- Attachment #1.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 #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 200 bytes --]

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  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
     [not found]   ` <1464947719-6245-5-git-send-email-hl-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
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-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=airlied-cv59FeDIM0c@public.gmane.org \
    --cc=dbasehore-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
    --cc=hl-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    --cc=huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    --cc=kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=mark.yao-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    --cc=mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
    --cc=myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=typ-TNX95d0MmH7DzftRWevZcw@public.gmane.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