Commit e5c97027 authored by Hartmut Knaack's avatar Hartmut Knaack Committed by Jonathan Cameron

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: default avatarHartmut Knaack <knaack.h@gmx.de>
Reviewed-by: default avatarDaniel Baluta <daniel.baluta@intel.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 39b441bd
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment