From: MyungJoo Ham <myungjoo.ham@samsung.com>
To: Chanwoo Choi <cw00.choi@samsung.com>,
Arvind Yadav <arvind.yadav.cs@gmail.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
"krzk@kernel.org" <krzk@kernel.org>,
"kgene@kernel.org" <kgene@kernel.org>,
"javier@osg.samsung.com" <javier@osg.samsung.com>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: Re: [PATCH v1] PM / devfreq: exynos-ppmu : Handle return value of clk_prepare_enable
Date: Wed, 24 May 2017 01:30:36 +0000 [thread overview]
Message-ID: <20170524013036epcms1p3f5ced11e6ebe5664ce70718dedcf8de1@epcms1p3> (raw)
In-Reply-To: <592403E7.8060906@samsung.com>
> On 2017년 05월 19일 19:56, Arvind Yadav wrote:
> > clk_prepare_enable() can fail here and we must check its return value.
> >
> > Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> > ---
> > drivers/devfreq/event/exynos-ppmu.c | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c
> > index 9b73509..8f6537a 100644
> > --- a/drivers/devfreq/event/exynos-ppmu.c
> > +++ b/drivers/devfreq/event/exynos-ppmu.c
> > @@ -648,7 +648,11 @@ static int exynos_ppmu_probe(struct platform_device *pdev)
> > dev_name(&pdev->dev), desc[i].name);
> > }
> >
> > - clk_prepare_enable(info->ppmu.clk);
> > + ret = clk_prepare_enable(info->ppmu.clk);
> > + if (ret) {
> > + dev_err(&pdev->dev, "failed to prepare ppmu clock\n");
> > + return ret;
> > + }
>
> You're right. But, actually, some ppmu device-tree node doesn't include
> the clock information because exynos clk driver don't support the
> clock for some ppmu devices. Until now, the clock of ppmu devices
> are default on state.
If it does not include the clock information, info->ppmu.clk is NULL,
which makes ret == NULL, so this should be ok.
(Line 593 of this file does that.)
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
(Applied to next-rc in devfreq tree)
(same applies to exynos-nocp commit as well)
Cheers,
MyungJoo
next prev parent reply other threads:[~2017-05-24 1:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170519105745epcas5p29a5cbb259cd15138d7220f34e130e00a@epcas5p2.samsung.com>
2017-05-19 10:56 ` [PATCH v1] PM / devfreq: exynos-ppmu : Handle return value of clk_prepare_enable Arvind Yadav
2017-05-23 9:41 ` Chanwoo Choi
2017-05-24 1:30 ` MyungJoo Ham [this message]
2017-05-24 1:54 ` Chanwoo Choi
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=20170524013036epcms1p3f5ced11e6ebe5664ce70718dedcf8de1@epcms1p3 \
--to=myungjoo.ham@samsung.com \
--cc=arvind.yadav.cs@gmail.com \
--cc=cw00.choi@samsung.com \
--cc=javier@osg.samsung.com \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.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