diff options
author | Hartmut Knaack <knaack.h@gmx.de> | 2015-06-18 00:32:01 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-06-21 14:26:36 +0100 |
commit | e5c97027449f235415990310e47071ec371fd46c (patch) | |
tree | 33987eb89c8113546e0e7ccde05c829ff11f663f /drivers/iio/light | |
parent | 39b441bd30a9eff4b3d2cc039027037403ca5242 (diff) | |
download | talos-op-linux-e5c97027449f235415990310e47071ec371fd46c.tar.gz talos-op-linux-e5c97027449f235415990310e47071ec371fd46c.zip |
iio:light:cm3323: pass up error value
cm3323_get_it_bits() returns a valid error code, so pass it up in
cm3323_read_raw().
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/light')
-rw-r--r-- | drivers/iio/light/cm3323.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/light/cm3323.c b/drivers/iio/light/cm3323.c index 869033e48a1f..9c9136309ffe 100644 --- a/drivers/iio/light/cm3323.c +++ b/drivers/iio/light/cm3323.c @@ -175,7 +175,7 @@ static int cm3323_read_raw(struct iio_dev *indio_dev, i = cm3323_get_it_bits(data); if (i < 0) { mutex_unlock(&data->mutex); - return -EINVAL; + return i; } *val = cm3323_int_time[i].val; |