]> git.karo-electronics.de Git - linux-beck.git/commit
iio: accel: mma9553: check input value for activity period
authorIrina Tirdea <irina.tirdea@intel.com>
Mon, 13 Apr 2015 15:40:49 +0000 (18:40 +0300)
committerJonathan Cameron <jic23@kernel.org>
Sun, 26 Apr 2015 18:43:08 +0000 (19:43 +0100)
commit1d93353da536d3403ac291dc96070f434f6cf285
tree356164fad3cc6ff85d1d47332efabcd220570539
parentae2ec9597c9329fdf503af264966bc7e421daa58
iio: accel: mma9553: check input value for activity period

When setting the activity period, the value introduced by
the user in sysfs is not checked for validity.

Add a boundary check so that only allowed values are
reported as successfully written to device.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Reported-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/mma9553.c