From ef4f92c064697a66a2a61977dd690af40dc01ff0 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 22 Oct 2012 12:15:00 +0100 Subject: [PATCH] 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 --- drivers/iio/industrialio-core.c | 2 ++ 1 file changed, 2 insertions(+) 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) {