]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: Prevent an integer overflow in the pca953x driver
authorJoshua Scott <joshua.scott@alliedtelesis.co.nz>
Fri, 22 May 2015 00:35:12 +0000 (12:35 +1200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 1 Jun 2015 14:53:55 +0000 (16:53 +0200)
commit8698397d51455f343a259793b0ed443fd88ae621
tree08f9f9f49b0014d3942d9cf34b5280aff50239ef
parent2b647856a5255f83e58406dadecb6a457b8627a0
gpio: Prevent an integer overflow in the pca953x driver

Interrupts were missed if an 8-bit integer overflow occurred. This was
observed when bank0,pin7 and bank1,pin7 changed simultaniously.

As the 8-bit totals were only checked against zero, replace them with
booleans. Name the booleans so that their purpose is clear.

Signed-off-by: Joshua Scott <joshua.scott@alliedtelesis.co.nz>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-pca953x.c