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: <20250315184824.4cd068a7@jic23-huawei>
Date: Sat, 15 Mar 2025 18:48:24 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: David Lechner <dlechner@...libre.com>
Cc: linux-iio@...r.kernel.org, Michael Hennerich
 <Michael.Hennerich@...log.com>, Angelo Dureghello
 <adureghello@...libre.com>, Alexandru Ardelean <aardelean@...libre.com>,
 Beniamin Bia <beniamin.bia@...log.com>, Stefan Popa
 <stefan.popa@...log.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/11] iio: adc: ad7606_spi: check error in
 ad7606B_sw_mode_config()

On Wed, 12 Mar 2025 20:15:39 -0500
David Lechner <dlechner@...libre.com> wrote:

> Add missing error check in ad7606B_sw_mode_config().
> 
> Fixes: d2a415c86c6b ("iio: adc: ad7606: Add support for AD7606B ADC")

Nice to have, but is there a path in which this happens other than
in hardware failure? If not probably not worth a fixes tag (which
tends to make people start backporting things).

> Signed-off-by: David Lechner <dlechner@...libre.com>
> ---
>  drivers/iio/adc/ad7606_spi.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/adc/ad7606_spi.c b/drivers/iio/adc/ad7606_spi.c
> index 885bf0b68e7775c5f4a12dfb827f502d5f782e8c..c028e08efe2c82cd97249f98eec50a9a9c06471f 100644
> --- a/drivers/iio/adc/ad7606_spi.c
> +++ b/drivers/iio/adc/ad7606_spi.c
> @@ -174,11 +174,13 @@ static int ad7616_sw_mode_config(struct iio_dev *indio_dev)
>  static int ad7606B_sw_mode_config(struct iio_dev *indio_dev)
>  {
>  	struct ad7606_state *st = iio_priv(indio_dev);
> +	int ret;
>  
>  	/* Configure device spi to output on a single channel */
> -	st->bops->reg_write(st,
> -			    AD7606_CONFIGURATION_REGISTER,
> -			    AD7606_SINGLE_DOUT);
> +	ret = st->bops->reg_write(st, AD7606_CONFIGURATION_REGISTER,
> +				  AD7606_SINGLE_DOUT);
> +	if (ret)
> +		return ret;
>  
>  	/*
>  	 * Scale can be configured individually for each channel
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ