Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1511027 > unrolled thread

[PATCH 03/10] staging: iio: tsl2583: return proper error code instead of -1

Started byBrian Masney <masneyb@onstation.org>
First post2016-10-28 12:10 +0200
Last post2016-10-30 19:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 03/10] staging: iio: tsl2583: return proper error code instead of -1 Brian Masney <masneyb@onstation.org> - 2016-10-28 12:10 +0200
    Re: [PATCH 03/10] staging: iio: tsl2583: return proper error code  instead of -1 Jonathan Cameron <jic23@kernel.org> - 2016-10-30 19:00 +0100

#1511027 — [PATCH 03/10] staging: iio: tsl2583: return proper error code instead of -1

FromBrian Masney <masneyb@onstation.org>
Date2016-10-28 12:10 +0200
Subject[PATCH 03/10] staging: iio: tsl2583: return proper error code instead of -1
Message-ID<sxcgO-6SN-19@gated-at.bofh.it>
taos_als_calibrate() has a code path where -1 is returned. This patch
changes the code so that a proper error code is returned.

Signed-off-by: Brian Masney <masneyb@onstation.org>
---
 drivers/staging/iio/light/tsl2583.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c
index 35c1696..47fd373 100644
--- a/drivers/staging/iio/light/tsl2583.c
+++ b/drivers/staging/iio/light/tsl2583.c
@@ -373,7 +373,7 @@ static int taos_als_calibrate(struct iio_dev *indio_dev)
 			!= (TSL258X_CNTL_ADC_ENBL | TSL258X_CNTL_PWR_ON)) {
 		dev_err(&chip->client->dev,
 			"taos_als_calibrate failed: device not powered on with ADC enabled\n");
-		return -1;
+		return -EINVAL;
 	}
 
 	ret = i2c_smbus_write_byte(chip->client,
-- 
2.7.4

[toc] | [next] | [standalone]


#1512161 — Re: [PATCH 03/10] staging: iio: tsl2583: return proper error code instead of -1

FromJonathan Cameron <jic23@kernel.org>
Date2016-10-30 19:00 +0100
SubjectRe: [PATCH 03/10] staging: iio: tsl2583: return proper error code instead of -1
Message-ID<sy2yJ-7Le-17@gated-at.bofh.it>
In reply to#1511027
On 28/10/16 11:00, Brian Masney wrote:
> taos_als_calibrate() has a code path where -1 is returned. This patch
> changes the code so that a proper error code is returned.
> 
> Signed-off-by: Brian Masney <masneyb@onstation.org>
Applied to the togreg branch of iio.git and pushed out as
testing for the autobuilders to play with it.
(I'm going to begin to get lazy on this message ;)
> ---
>  drivers/staging/iio/light/tsl2583.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c
> index 35c1696..47fd373 100644
> --- a/drivers/staging/iio/light/tsl2583.c
> +++ b/drivers/staging/iio/light/tsl2583.c
> @@ -373,7 +373,7 @@ static int taos_als_calibrate(struct iio_dev *indio_dev)
>  			!= (TSL258X_CNTL_ADC_ENBL | TSL258X_CNTL_PWR_ON)) {
>  		dev_err(&chip->client->dev,
>  			"taos_als_calibrate failed: device not powered on with ADC enabled\n");
> -		return -1;
> +		return -EINVAL;
>  	}
>  
>  	ret = i2c_smbus_write_byte(chip->client,
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web