forked from Minki/linux
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: 064c73afe7
("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>
This commit is contained in:
parent
5ad284ab3a
commit
e43c26e12d
@ -814,7 +814,7 @@ static irqreturn_t pca953x_irq_handler(int irq, void *devid)
|
|||||||
{
|
{
|
||||||
struct pca953x_chip *chip = devid;
|
struct pca953x_chip *chip = devid;
|
||||||
struct gpio_chip *gc = &chip->gpio_chip;
|
struct gpio_chip *gc = &chip->gpio_chip;
|
||||||
DECLARE_BITMAP(pending, MAX_LINE);
|
DECLARE_BITMAP(pending, MAX_LINE) = {};
|
||||||
int level;
|
int level;
|
||||||
bool ret;
|
bool ret;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user