From: Lars-Peter Clausen Date: Mon, 22 Oct 2012 11:15:00 +0000 (+0100) Subject: iio: Accept a leading '+' sign when parsing fixed point numbers X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ef4f92c064697a66a2a61977dd690af40dc01ff0;p=linux-beck.git 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 Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 7bb570b7a4af..cd700368eed0 100644 --- a/drivers/iio/industrialio-core.c +++ b/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) {