iio: Accept a leading '+' sign when parsing fixed point numbers
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 22 Oct 2012 11:15:00 +0000 (12:15 +0100)
committerJonathan Cameron <jic23@kernel.org>
Fri, 2 Nov 2012 09:43:48 +0000 (09:43 +0000)
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>
drivers/iio/industrialio-core.c

index 7bb570b..cd70036 100644 (file)
@@ -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) {