diff options
author | 2015-12-10 15:55:29 +0100 | |
---|---|---|
committer | 2015-12-17 15:47:38 +0100 | |
commit | 67a76aafec00db46fbd65d7d17a1cde1adde70c5 (patch) | |
tree | 0f1373bf6ffc834c42738d80d79db00616f599ea /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | gpio: ath79: Fix the logic to clear offset bit of AR71XX_GPIO_REG_OE register (diff) | |
download | wireguard-linux-67a76aafec00db46fbd65d7d17a1cde1adde70c5.tar.xz wireguard-linux-67a76aafec00db46fbd65d7d17a1cde1adde70c5.zip |
gpio: generic: clamp values from bgpio_get_set()
The bgpio_get_set() call should return a value clamped to [0,1],
the current code will return a negative value if reading
bit 31, which turns the value negative as this is a signed value
and thus gets interpreted as an error by the gpiolib core.
Found on the gpio-mxc but applies to any MMIO driver.
Cc: stable@vger.kernel.org # 4.3+
Cc: kernel@pengutronix.de
Cc: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Fixes: e20538b82f1f ("gpio: Propagate errors from chip->get()")
Reported-by: Clemens Gruber <clemens.gruber@pqgruber.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions