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] [thread-next>] [day] [month] [year] [list]
Message-ID: <e315c126-619c-48a1-a5d8-001e5ed01930@topic.nl>
Date: Thu, 22 Feb 2024 08:10:25 +0100
From: Mike Looijmans <mike.looijmans@...ic.nl>
To: Dan Carpenter <dan.carpenter@...aro.org>
CC: Jonathan Cameron <jic23@...nel.org>, Lars-Peter Clausen
 <lars@...afoo.de>, Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
 linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
 kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 1/2] iio: adc: ti-ads1298: Fix error code in probe()

Good catch on both patches.

If so desired, you have my

Acked-by: Mike Looijmans <mike.looijmans@...ic.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@...aro.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@...ic.nl
W: www.topic.nl




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ