commit | 9295c01253b4eda5dc0b5a5b2e0fd321fe57010c | [log] [tgz] |
---|---|---|
author | Christophe Leroy <christophe.leroy@c-s.fr> | Mon Dec 18 11:08:31 2017 +0100 |
committer | Linus Walleij <linus.walleij@linaro.org> | Wed Dec 20 10:33:21 2017 +0100 |
tree | 779f856770f7759d7f15bd29c9717e44208be691 | |
parent | 7fda9100bb8258bbdff90f3db5079d28eb9b0013 [diff] |
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: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>