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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 22 Jan 2016 07:31:55 +0000
From:	"Gujulan Elango, Hari Prasath (H.)" <hgujulan@...teon.com>
To:	Matt Ranostay <mranostay@...il.com>
CC:	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"jic23@...nel.org" <jic23@...nel.org>,
	"knaack.h@....de" <knaack.h@....de>,
	"lars@...afoo.de" <lars@...afoo.de>,
	"pmeerw@...erw.net" <pmeerw@...erw.net>,
	"daniel.baluta@...el.com" <daniel.baluta@...el.com>,
	"ciorneiioana@...il.com" <ciorneiioana@...il.com>,
	"hamohammed.sa@...il.com" <hamohammed.sa@...il.com>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: iio: replace clk_get() with devm_clk_get()

On Thu, Jan 21, 2016 at 11:21:53AM -0800, Matt Ranostay wrote:
> On Thu, Jan 21, 2016 at 1:11 AM, Gujulan Elango, Hari Prasath (H.)
> <hgujulan@...teon.com> wrote:
> > From: Hari Prasath Gujulan Elango
> >
> > This patch replaces the clk_get() with devm_clk_get().
> > Accordingly,modified the error paths and removed clk_put() as well.
> >
> > Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@...teon.com>
> > ---
> >  drivers/staging/iio/adc/spear_adc.c | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/staging/iio/adc/spear_adc.c b/drivers/staging/iio/adc/spear_adc.c
> > index 712cae0..4ac0f54 100644
> > --- a/drivers/staging/iio/adc/spear_adc.c
> > +++ b/drivers/staging/iio/adc/spear_adc.c
> > @@ -288,7 +288,7 @@ static int spear_adc_probe(struct platform_device *pdev)
> >         st->adc_base_spear3xx =
> >                 (struct adc_regs_spear3xx __iomem *)st->adc_base_spear6xx;
> >
> > -       st->clk = clk_get(dev, NULL);
> > +       st->clk = devm_clk_get(dev, NULL);
> >         if (IS_ERR(st->clk)) {
> >                 dev_err(dev, "failed getting clock\n");
> >                 goto errout1;
> > @@ -297,7 +297,7 @@ static int spear_adc_probe(struct platform_device *pdev)
> >         ret = clk_prepare_enable(st->clk);
> >         if (ret) {
> >                 dev_err(dev, "failed enabling clock\n");
> > -               goto errout2;
> > +               goto errout1;
> >         }
> >
> >         irq = platform_get_irq(pdev, 0);
> > @@ -356,8 +356,6 @@ static int spear_adc_probe(struct platform_device *pdev)
> >
> >  errout3:
> >         clk_disable_unprepare(st->clk);
> 
> Shouldn't errout3 now be errout2.. having a gap would seem odd.
> 
I agree with you on this. But as Dan says,I would correct it in a
different patch.
> > -errout2:
> > -       clk_put(st->clk);
> >  errout1:
> >         iounmap(st->adc_base_spear6xx);
> >         return ret;
> > --
> > 1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ