Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: David Lechner <dlechner@baylibre.com>
Cc: linux-iio@vger.kernel.org,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Angelo Dureghello" <adureghello@baylibre.com>,
	"Alexandru Ardelean" <aardelean@baylibre.com>,
	"Beniamin Bia" <beniamin.bia@analog.com>,
	"Stefan Popa" <stefan.popa@analog.com>,
	linux-kernel@vger.kernel.org, "Nuno Sá" <nuno.sa@analog.com>
Subject: Re: [PATCH v2 02/10] iio: adc: ad7606_spi: check error in ad7606B_sw_mode_config()
Date: Sun, 30 Mar 2025 18:58:45 +0100	[thread overview]
Message-ID: <20250330185845.1cc4cba4@jic23-huawei> (raw)
In-Reply-To: <20250318-iio-adc-ad7606-improvements-v2-2-4b605427774c@baylibre.com>

On Tue, 18 Mar 2025 17:52:10 -0500
David Lechner <dlechner@baylibre.com> wrote:

> Add missing error check in ad7606B_sw_mode_config().
> 
> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> Signed-off-by: David Lechner <dlechner@baylibre.com>
Applied to the togreg branch of iio.git.
For now pushed out as testing. I'll rebase on rc1 before pushing
it out as a non rebasing branch.

Thanks,

Jonathan

> ---
>  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
> 


  reply	other threads:[~2025-03-30 17:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-18 22:52 [PATCH v2 00/10] iio: adc: ad7606: improvements and ad7606c parallel interface support David Lechner
2025-03-18 22:52 ` [PATCH v2 01/10] iio: adc: ad7606: check for NULL before calling sw_mode_config() David Lechner
2025-03-30 17:56   ` Jonathan Cameron
2025-03-18 22:52 ` [PATCH v2 02/10] iio: adc: ad7606_spi: check error in ad7606B_sw_mode_config() David Lechner
2025-03-30 17:58   ` Jonathan Cameron [this message]
2025-03-18 22:52 ` [PATCH v2 03/10] iio: adc: ad7606: add missing max sample rates David Lechner
2025-03-18 22:52 ` [PATCH v2 04/10] iio: adc: ad7606: use devm_mutex_init() David Lechner
2025-03-18 22:52 ` [PATCH v2 05/10] iio: adc: ad7606: fix kernel-doc comments David Lechner
2025-03-18 22:52 ` [PATCH v2 06/10] iio: adc: ad7606: use kernel identifier name style David Lechner
2025-03-18 22:52 ` [PATCH v2 07/10] iio: adc: ad7606: don't use address field David Lechner
2025-03-18 22:52 ` [PATCH v2 08/10] iio: adc: ad7606: drop ch param from ad7606_scale_setup_cb_t David Lechner
2025-03-30 18:01   ` Jonathan Cameron
2025-03-18 22:52 ` [PATCH v2 09/10] iio: adc: ad7606: dynamically allocate channel info David Lechner
2025-03-22 17:25   ` Dan Carpenter
2025-03-24 13:50     ` David Lechner
2025-03-30 18:07       ` Jonathan Cameron
2025-03-18 22:52 ` [PATCH v2 10/10] iio: adc: ad7606_par: add ad7606c chips David Lechner
2025-03-30 18:08   ` Jonathan Cameron

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=20250330185845.1cc4cba4@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=aardelean@baylibre.com \
    --cc=adureghello@baylibre.com \
    --cc=beniamin.bia@analog.com \
    --cc=dlechner@baylibre.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=stefan.popa@analog.com \
    /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