Skip to content
Commit 9295c012 authored by Christophe Leroy's avatar Christophe Leroy Committed by Linus Walleij
Browse files

gpio: sysfs: correct error handling on 'value' attribute read.



'value' attribute is supposed to only return 0 or 1 according to
the documentation.
With today's implementation, if gpiod_get_value_cansleep() fails
the printed 'value' is a negative value.

This patch ensures that an error is returned on read instead.

Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 7fda9100
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment