From: Mike Looijmans <mike.looijmans@topic.nl>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/2] iio: adc: ti-ads1298: Fix error code in probe()
Date: Thu, 22 Feb 2024 08:10:25 +0100 [thread overview]
Message-ID: <e315c126-619c-48a1-a5d8-001e5ed01930@topic.nl> (raw)
In-Reply-To: <5f393a87-ca8b-4e68-a6f4-a79f75a91ccb@moroto.mountain>
Good catch on both patches.
If so desired, you have my
Acked-by: Mike Looijmans <mike.looijmans@topic.nl>
On 22-02-2024 07:14, Dan Carpenter wrote:
> There is a copy and paste bug here, it should be "reg_vref" instead of
> "reg_avdd". The "priv->reg_avdd" variable is zero so it ends up
> returning success.
>
> Fixes: 00ef7708fa60 ("iio: adc: ti-ads1298: Add driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> drivers/iio/adc/ti-ads1298.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/ti-ads1298.c b/drivers/iio/adc/ti-ads1298.c
> index ed895a30beed..67637f1abdc7 100644
> --- a/drivers/iio/adc/ti-ads1298.c
> +++ b/drivers/iio/adc/ti-ads1298.c
> @@ -657,7 +657,7 @@ static int ads1298_probe(struct spi_device *spi)
> priv->reg_vref = devm_regulator_get_optional(dev, "vref");
> if (IS_ERR(priv->reg_vref)) {
> if (PTR_ERR(priv->reg_vref) != -ENODEV)
> - return dev_err_probe(dev, PTR_ERR(priv->reg_avdd),
> + return dev_err_probe(dev, PTR_ERR(priv->reg_vref),
> "Failed to get vref regulator\n");
>
> priv->reg_vref = NULL;
--
Mike Looijmans
System Expert
TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands
T: +31 (0) 499 33 69 69
E: mike.looijmans@topic.nl
W: www.topic.nl
next prev parent reply other threads:[~2024-02-22 7:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 6:14 [PATCH 1/2] iio: adc: ti-ads1298: Fix error code in probe() Dan Carpenter
2024-02-22 6:15 ` [PATCH 2/2] iio: adc: ti-ads1298: prevent divide by zero in ads1298_set_samp_freq() Dan Carpenter
2024-02-22 7:10 ` Mike Looijmans [this message]
2024-02-24 18:13 ` [PATCH 1/2] iio: adc: ti-ads1298: Fix error code in probe() Jonathan Cameron
2024-02-26 7:45 ` Dan Carpenter
2024-02-26 14:37 ` Andy Shevchenko
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=e315c126-619c-48a1-a5d8-001e5ed01930@topic.nl \
--to=mike.looijmans@topic.nl \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dan.carpenter@linaro.org \
--cc=jic23@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@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