Commit cc141c35 authored by Dmitry Torokhov's avatar Dmitry Torokhov

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: bcd9730a ("Input: move to use request_irq by IRQF_NO_AUTOEN flag")
Link: https://lore.kernel.org/r/20230724053024.352054-3-dmitry.torokhov@gmail.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent d3176b29
...@@ -291,10 +291,8 @@ static int tca6416_keypad_probe(struct i2c_client *client) ...@@ -291,10 +291,8 @@ static int tca6416_keypad_probe(struct i2c_client *client)
return 0; return 0;
fail2: fail2:
if (!chip->use_polling) { if (!chip->use_polling)
free_irq(client->irq, chip); free_irq(client->irq, chip);
enable_irq(client->irq);
}
fail1: fail1:
input_free_device(input); input_free_device(input);
kfree(chip); kfree(chip);
...@@ -305,10 +303,8 @@ static void tca6416_keypad_remove(struct i2c_client *client) ...@@ -305,10 +303,8 @@ static void tca6416_keypad_remove(struct i2c_client *client)
{ {
struct tca6416_keypad_chip *chip = i2c_get_clientdata(client); struct tca6416_keypad_chip *chip = i2c_get_clientdata(client);
if (!chip->use_polling) { if (!chip->use_polling)
free_irq(client->irq, chip); free_irq(client->irq, chip);
enable_irq(client->irq);
}
input_unregister_device(chip->input); input_unregister_device(chip->input);
kfree(chip); kfree(chip);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment