staging: iio: tsl2583: add error code to sysfs store functions
authorBrian Masney <masneyb@onstation.org>
Fri, 28 Oct 2016 10:00:20 +0000 (06:00 -0400)
committerJonathan Cameron <jic23@kernel.org>
Tue, 1 Nov 2016 18:50:08 +0000 (18:50 +0000)
commitf375a49f710535b0ac2923274e2a33f04e02514d
tree7ba1dbac256f4433ae89de0b60af245e6546f017
parentb2fa81be96ca315a164ef7bc1d87fbf025fd9954
staging: iio: tsl2583: add error code to sysfs store functions

in_illuminance_input_target_store() and in_illuminance_calibrate_store()
validated the data from userspace, however it would not return an
error code to userspace if an invalid value was passed in. This patch
changes these functions so that they return -EINVAL if invalid data is
passed in.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/light/tsl2583.c