lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170524013036epcms1p3f5ced11e6ebe5664ce70718dedcf8de1@epcms1p3>
Date:   Wed, 24 May 2017 01:30:36 +0000
From:   MyungJoo Ham <myungjoo.ham@...sung.com>
To:     Chanwoo Choi <cw00.choi@...sung.com>,
        Arvind Yadav <arvind.yadav.cs@...il.com>,
        Kyungmin Park <kyungmin.park@...sung.com>,
        "krzk@...nel.org" <krzk@...nel.org>,
        "kgene@...nel.org" <kgene@...nel.org>,
        "javier@....samsung.com" <javier@....samsung.com>
CC:     "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-samsung-soc@...r.kernel.org" 
        <linux-samsung-soc@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: Re: [PATCH v1] PM / devfreq: exynos-ppmu : Handle return value
 of clk_prepare_enable

> 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@...il.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@...sung.com>
(Applied to next-rc in devfreq tree)

(same applies to exynos-nocp commit as well)


Cheers,
MyungJoo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ