summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/industrialio-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 37650a72b31..0994239361b 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -454,7 +454,7 @@ static ssize_t iio_write_channel_info(struct device *dev,
break;
else
return -EINVAL;
- } else if (*buf == '.') {
+ } else if (*buf == '.' && integer_part) {
integer_part = false;
} else {
return -EINVAL;