Skip to content

Commit

Permalink
iio: Accept a leading '+' sign when parsing fixed point numbers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lars-Peter Clausen authored and Jonathan Cameron committed Nov 2, 2012
1 parent 02330ac commit ef4f92c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/iio/industrialio-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ef4f92c

Please sign in to comment.