public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Gujulan Elango, Hari Prasath (H.)" <hgujulan@visteon.com>
To: Matt Ranostay <mranostay@gmail.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"jic23@kernel.org" <jic23@kernel.org>,
	"knaack.h@gmx.de" <knaack.h@gmx.de>,
	"lars@metafoo.de" <lars@metafoo.de>,
	"pmeerw@pmeerw.net" <pmeerw@pmeerw.net>,
	"daniel.baluta@intel.com" <daniel.baluta@intel.com>,
	"ciorneiioana@gmail.com" <ciorneiioana@gmail.com>,
	"hamohammed.sa@gmail.com" <hamohammed.sa@gmail.com>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: iio: replace clk_get() with devm_clk_get()
Date: Fri, 22 Jan 2016 07:31:55 +0000	[thread overview]
Message-ID: <20160122073258.GB10350@IND12F0122> (raw)
In-Reply-To: <CAKzfze_t39zoDv16ng04NpVLW1PG3n5WtCnvVp=Amh4EKme2FA@mail.gmail.com>

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@visteon.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@visteon.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

      parent reply	other threads:[~2016-01-22  9:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21  9:11 [PATCH] staging: iio: replace clk_get() with devm_clk_get() Gujulan Elango, Hari Prasath (H.)
2016-01-21  9:45 ` Dan Carpenter
2016-01-21  9:53   ` Gujulan Elango, Hari Prasath (H.)
2016-01-21 19:21 ` Matt Ranostay
2016-01-21 19:46   ` Dan Carpenter
2016-01-22  7:31   ` Gujulan Elango, Hari Prasath (H.) [this message]

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=20160122073258.GB10350@IND12F0122 \
    --to=hgujulan@visteon.com \
    --cc=ciorneiioana@gmail.com \
    --cc=daniel.baluta@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hamohammed.sa@gmail.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mranostay@gmail.com \
    --cc=pmeerw@pmeerw.net \
    /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