From: Jonathan Cameron <jic23@kernel.org>
To: Dan Carpenter <error27@gmail.com>
Cc: Mike Looijmans <mike.looijmans@topic.nl>,
Lars-Peter Clausen <lars@metafoo.de>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] iio: adc: ti-ads1100: fix error code in probe()
Date: Sat, 1 Apr 2023 14:37:54 +0100 [thread overview]
Message-ID: <20230401143754.1e561d0b@jic23-huawei> (raw)
In-Reply-To: <36fa2aeb-f392-4793-8b38-ae15514033c8@kili.mountain>
On Thu, 23 Mar 2023 18:23:56 +0300
Dan Carpenter <error27@gmail.com> wrote:
> This code has a copy and paste bug so it accidentally returns
> "PTR_ERR(data->reg_vdd)" which is a valid pointer cast to int. It
> should return "ret" instead.
>
> Fixes: 541880542f2b ("iio: adc: Add TI ADS1100 and ADS1000")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Applied to the togreg branch of iio.git as this driver is not yet upstream.
Thanks,
Jonathan
> ---
> drivers/iio/adc/ti-ads1100.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/ti-ads1100.c b/drivers/iio/adc/ti-ads1100.c
> index 6a478efb108b..6b5aebb82455 100644
> --- a/drivers/iio/adc/ti-ads1100.c
> +++ b/drivers/iio/adc/ti-ads1100.c
> @@ -344,7 +344,7 @@ static int ads1100_probe(struct i2c_client *client)
>
> ret = regulator_enable(data->reg_vdd);
> if (ret < 0)
> - return dev_err_probe(dev, PTR_ERR(data->reg_vdd),
> + return dev_err_probe(dev, ret,
> "Failed to enable vdd regulator\n");
>
> ret = devm_add_action_or_reset(dev, ads1100_reg_disable, data->reg_vdd);
prev parent reply other threads:[~2023-04-01 13:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-23 15:23 [PATCH] iio: adc: ti-ads1100: fix error code in probe() Dan Carpenter
2023-04-01 13:37 ` 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=20230401143754.1e561d0b@jic23-huawei \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=mike.looijmans@topic.nl \
/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