Skip to content

Commit cc141c3

Browse files
committed
Input: tca6416-keypad - fix interrupt enable disbalance
The driver has been switched to use IRQF_NO_AUTOEN, but in the error unwinding and remove paths calls to enable_irq() were left in place, which will lead to an incorrect enable counter value. Fixes: bcd9730 ("Input: move to use request_irq by IRQF_NO_AUTOEN flag") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent d3176b2 commit cc141c3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/input/keyboard/tca6416-keypad.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,8 @@ static int tca6416_keypad_probe(struct i2c_client *client)
291291
return 0;
292292

293293
fail2:
294-
if (!chip->use_polling) {
294+
if (!chip->use_polling)
295295
free_irq(client->irq, chip);
296-
enable_irq(client->irq);
297-
}
298296
fail1:
299297
input_free_device(input);
300298
kfree(chip);
@@ -305,10 +303,8 @@ static void tca6416_keypad_remove(struct i2c_client *client)
305303
{
306304
struct tca6416_keypad_chip *chip = i2c_get_clientdata(client);
307305

308-
if (!chip->use_polling) {
306+
if (!chip->use_polling)
309307
free_irq(client->irq, chip);
310-
enable_irq(client->irq);
311-
}
312308

313309
input_unregister_device(chip->input);
314310
kfree(chip);

0 commit comments

Comments
 (0)