linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 2/2] iio: sca3000: Handle errors returned by 'sca3000_configure_ring()' in 'sca3000_probe()'
@ 2018-04-08 19:44 Christophe JAILLET
  2018-04-15 19:19 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2018-04-08 19:44 UTC (permalink / raw)
  To: jic23, knaack.h, lars, pmeerw, nfarnesi4
  Cc: linux-iio, linux-kernel, kernel-janitors, Christophe JAILLET

'sca3000_configure_ring()' can fail, so test its return value and
propagate it if needed.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Same as v1
---
 drivers/iio/accel/sca3000.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000.c
index 562f125235db..4dceb75e3586 100644
--- a/drivers/iio/accel/sca3000.c
+++ b/drivers/iio/accel/sca3000.c
@@ -1481,7 +1481,9 @@ static int sca3000_probe(struct spi_device *spi)
 	}
 	indio_dev->modes = INDIO_DIRECT_MODE;
 
-	sca3000_configure_ring(indio_dev);
+	ret = sca3000_configure_ring(indio_dev);
+	if (ret)
+		return ret;
 
 	if (spi->irq) {
 		ret = request_threaded_irq(spi->irq,
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 2/2] iio: sca3000: Handle errors returned by 'sca3000_configure_ring()' in 'sca3000_probe()'
  2018-04-08 19:44 [PATCH v2 2/2] iio: sca3000: Handle errors returned by 'sca3000_configure_ring()' in 'sca3000_probe()' Christophe JAILLET
@ 2018-04-15 19:19 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2018-04-15 19:19 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: knaack.h, lars, pmeerw, nfarnesi4, linux-iio, linux-kernel,
	kernel-janitors

On Sun,  8 Apr 2018 21:44:15 +0200
Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:

> 'sca3000_configure_ring()' can fail, so test its return value and
> propagate it if needed.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.  Thanks,

Jonathan

> ---
> Same as v1
> ---
>  drivers/iio/accel/sca3000.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000.c
> index 562f125235db..4dceb75e3586 100644
> --- a/drivers/iio/accel/sca3000.c
> +++ b/drivers/iio/accel/sca3000.c
> @@ -1481,7 +1481,9 @@ static int sca3000_probe(struct spi_device *spi)
>  	}
>  	indio_dev->modes = INDIO_DIRECT_MODE;
>  
> -	sca3000_configure_ring(indio_dev);
> +	ret = sca3000_configure_ring(indio_dev);
> +	if (ret)
> +		return ret;
>  
>  	if (spi->irq) {
>  		ret = request_threaded_irq(spi->irq,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-15 19:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-08 19:44 [PATCH v2 2/2] iio: sca3000: Handle errors returned by 'sca3000_configure_ring()' in 'sca3000_probe()' Christophe JAILLET
2018-04-15 19:19 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).