aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fpga/fpga-mgr.c
diff options
context:
space:
mode:
authorLinus Walleij <[email protected]>2015-12-10 14:55:29 +0000
committerLinus Walleij <[email protected]>2015-12-17 14:47:38 +0000
commit67a76aafec00db46fbd65d7d17a1cde1adde70c5 (patch)
tree0f1373bf6ffc834c42738d80d79db00616f599ea /drivers/fpga/fpga-mgr.c
parentgpio: ath79: Fix the logic to clear offset bit of AR71XX_GPIO_REG_OE register (diff)
downloadkernel-67a76aafec00db46fbd65d7d17a1cde1adde70c5.tar.gz
kernel-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: [email protected] # 4.3+ Cc: [email protected] Cc: Vladimir Zapolskiy <[email protected]> Fixes: e20538b82f1f ("gpio: Propagate errors from chip->get()") Reported-by: Clemens Gruber <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions