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>
This commit is contained in:
Lars-Peter Clausen 2012-10-22 12:15:00 +01:00 committed by Jonathan Cameron
parent 02330acda7
commit ef4f92c064
1 changed files with 2 additions and 0 deletions

View 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) {