]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit83cafa1e2ebb7f0b12a92d2d508b8d2b08db759e
tree7ba1dbac256f4433ae89de0b60af245e6546f017
parentb066163d07e63edd800852bc8b4fd3cea71487b1
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