Bail out if reading the status register fails, otherwise we'll carry on with a negative error code as if it were read from the keypad, and falsely report events or errors. Fixes: 9d2e173644bb ('Input: ADP5589 - new driver for I2C Keypad Decoder and I/O Expander') Signed-off-by: Guido Martínez <guido@xxxxxxxxxxxxxxxxxxxx> --- drivers/input/keyboard/adp5589-keys.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c index a452677..19edd2d 100644 --- a/drivers/input/keyboard/adp5589-keys.c +++ b/drivers/input/keyboard/adp5589-keys.c @@ -622,6 +622,9 @@ static irqreturn_t adp5589_irq(int irq, void *handle) status = adp5589_read(client, ADP5589_5_INT_STATUS); + if (status < 0) + return IRQ_HANDLED; + if (status & OVRFLOW_INT) /* Unlikely and should never happen */ dev_err(&client->dev, "Event Overflow Error\n"); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html