]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: pca953x: Fix uninitialized pending variable
authorYe Li <ye.li@nxp.com>
Wed, 23 Sep 2020 09:03:44 +0000 (02:03 -0700)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Thu, 24 Sep 2020 13:06:44 +0000 (15:06 +0200)
commit1fd8784aff9a2c2a0799446462230a5cd676f34d
treeea23e554509b36130798a06bf05fdc161f75306e
parent1d99bf1be37d26546b544fb72f8d70a794531b72
gpio: pca953x: Fix uninitialized pending variable

When pca953x_irq_pending returns false, the pending parameter won't
be set. But pca953x_irq_handler continues using this uninitialized
variable as pending irqs and will cause problem.
Fix the issue by initializing pending to 0.

Fixes: 80276007aa5c ("gpio: pca953x: Synchronize interrupt handler properly")
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpio-pca953x.c