Browse Source

iio: Accept a leading '+' sign when parsing fixed point numbers

If we encounter a leading '+' sign just skip over it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen 12 years ago
parent
commit
ef4f92c064
1 changed files with 2 additions and 0 deletions
  1. 2 0
      drivers/iio/industrialio-core.c

+ 2 - 0
drivers/iio/industrialio-core.c

@@ -437,6 +437,8 @@ static ssize_t iio_write_channel_info(struct device *dev,
 	if (buf[0] == '-') {
 		negative = true;
 		buf++;
+	} else if (buf[0] == '+') {
+		buf++;
 	}
 
 	while (*buf) {