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:
committed by
Jonathan Cameron
parent
02330acda7
commit
ef4f92c064
@@ -437,6 +437,8 @@ static ssize_t iio_write_channel_info(struct device *dev,
|
|||||||
if (buf[0] == '-') {
|
if (buf[0] == '-') {
|
||||||
negative = true;
|
negative = true;
|
||||||
buf++;
|
buf++;
|
||||||
|
} else if (buf[0] == '+') {
|
||||||
|
buf++;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (*buf) {
|
while (*buf) {
|
||||||
|
Reference in New Issue
Block a user