iio: cros_ec: Remove replacing error code with -EIO
authorGwendal Grignou <gwendal@chromium.org>
Thu, 18 Jul 2019 22:22:37 +0000 (15:22 -0700)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 27 Jul 2019 21:52:04 +0000 (22:52 +0100)
commitf53199c0bc62657f7bc253b5dfc9f3d81ed2ca28
treef181f7b042b95b5b5408ee0b56892674401e2054
parented1f2e85da79274f3dc4092953f1359eb732f0c6
iio: cros_ec: Remove replacing error code with -EIO

Due to an API misread, error code can be different for -EIO when reading
a sysfs entry. Return the error reported by the cros_ec stack.

Check the proper error message (protocol error, not supported) is
reported when there is an error returned by the EC stack.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
drivers/iio/light/cros_ec_light_prox.c
drivers/iio/pressure/cros_ec_baro.c