aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/lis3lv02d/lis3lv02d.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/lis3lv02d/lis3lv02d.c')
-rw-r--r--drivers/misc/lis3lv02d/lis3lv02d.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c
index 4cd4a3d2a76a..036effe9a795 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d.c
+++ b/drivers/misc/lis3lv02d/lis3lv02d.c
@@ -831,9 +831,11 @@ static ssize_t lis3lv02d_rate_set(struct device *dev,
831{ 831{
832 struct lis3lv02d *lis3 = dev_get_drvdata(dev); 832 struct lis3lv02d *lis3 = dev_get_drvdata(dev);
833 unsigned long rate; 833 unsigned long rate;
834 int ret;
834 835
835 if (strict_strtoul(buf, 0, &rate)) 836 ret = kstrtoul(buf, 0, &rate);
836 return -EINVAL; 837 if (ret)
838 return ret;
837 839
838 lis3lv02d_sysfs_poweron(lis3); 840 lis3lv02d_sysfs_poweron(lis3);
839 if (lis3lv02d_set_odr(lis3, rate)) 841 if (lis3lv02d_set_odr(lis3, rate))