From: Jonathan Cameron <jic23@kernel.org>
To: "Ardelean, Alexandru" <alexandru.Ardelean@analog.com>
Cc: "hslester96@gmail.com" <hslester96@gmail.com>,
"Popa, Stefan Serban" <StefanSerban.Popa@analog.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"lars@metafoo.de" <lars@metafoo.de>,
"Hennerich, Michael" <Michael.Hennerich@analog.com>,
"pmeerw@pmeerw.net" <pmeerw@pmeerw.net>,
"knaack.h@gmx.de" <knaack.h@gmx.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: iio: ad9834: add a check for devm_clk_get
Date: Fri, 18 Oct 2019 20:10:16 +0100 [thread overview]
Message-ID: <20191018201016.0a7fde4f@archlinux> (raw)
In-Reply-To: <3acc69aceb04667ba34200f54c59b3d160ab2f5d.camel@analog.com>
On Thu, 17 Oct 2019 12:56:33 +0000
"Ardelean, Alexandru" <alexandru.Ardelean@analog.com> wrote:
> On Wed, 2019-10-16 at 22:25 +0800, Chuhong Yuan wrote:
> > ad9834_probe misses a check for devm_clk_get and may cause problems.
> > Add a check like what ad9832 does to fix it.
> >
>
> This could also use a Fixes tag, but not a big deal.
>
> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to play with it.
As a general point though, the fact that a devm error handler
actually has things to do suggests this code doesn't pass
the obviously correct test.
Nothing to do with this patch mind you!
Jonathan
>
> > Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
> > ---
> > drivers/staging/iio/frequency/ad9834.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/staging/iio/frequency/ad9834.c
> > b/drivers/staging/iio/frequency/ad9834.c
> > index 038d6732c3fd..23026978a5a5 100644
> > --- a/drivers/staging/iio/frequency/ad9834.c
> > +++ b/drivers/staging/iio/frequency/ad9834.c
> > @@ -417,6 +417,10 @@ static int ad9834_probe(struct spi_device *spi)
> > st = iio_priv(indio_dev);
> > mutex_init(&st->lock);
> > st->mclk = devm_clk_get(&spi->dev, NULL);
> > + if (IS_ERR(st->mclk)) {
> > + ret = PTR_ERR(st->mclk);
> > + goto error_disable_reg;
> > + }
> >
> > ret = clk_prepare_enable(st->mclk);
> > if (ret) {
prev parent reply other threads:[~2019-10-18 19:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 14:25 [PATCH] staging: iio: ad9834: add a check for devm_clk_get Chuhong Yuan
2019-10-16 15:02 ` Dan Carpenter
2019-10-17 12:56 ` Ardelean, Alexandru
2019-10-18 19:10 ` Jonathan Cameron [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=20191018201016.0a7fde4f@archlinux \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=StefanSerban.Popa@analog.com \
--cc=alexandru.Ardelean@analog.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hslester96@gmail.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.