From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: linux-input@vger.kernel.org
Cc: Yangtao Li <frank.li@vivo.com>, linux-kernel@vger.kernel.org
Subject: [PATCH 3/5] Input: tca6416-keypad - fix interrupt enable disbalance
Date: Sun, 23 Jul 2023 22:30:20 -0700 [thread overview]
Message-ID: <20230724053024.352054-3-dmitry.torokhov@gmail.com> (raw)
In-Reply-To: <20230724053024.352054-1-dmitry.torokhov@gmail.com>
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: bcd9730a04a1 ("Input: move to use request_irq by IRQF_NO_AUTOEN flag")
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/input/keyboard/tca6416-keypad.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/input/keyboard/tca6416-keypad.c b/drivers/input/keyboard/tca6416-keypad.c
index 906dffbf171c..21a2f2de4345 100644
--- a/drivers/input/keyboard/tca6416-keypad.c
+++ b/drivers/input/keyboard/tca6416-keypad.c
@@ -291,10 +291,8 @@ static int tca6416_keypad_probe(struct i2c_client *client)
return 0;
fail2:
- if (!chip->use_polling) {
+ if (!chip->use_polling)
free_irq(client->irq, chip);
- enable_irq(client->irq);
- }
fail1:
input_free_device(input);
kfree(chip);
@@ -305,10 +303,8 @@ static void tca6416_keypad_remove(struct i2c_client *client)
{
struct tca6416_keypad_chip *chip = i2c_get_clientdata(client);
- if (!chip->use_polling) {
+ if (!chip->use_polling)
free_irq(client->irq, chip);
- enable_irq(client->irq);
- }
input_unregister_device(chip->input);
kfree(chip);
--
2.41.0.487.g6d72f3e995-goog
next prev parent reply other threads:[~2023-07-24 5:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-24 5:30 [PATCH 1/5] Input: tca6416-keypad - always expect proper IRQ number in i2c client Dmitry Torokhov
2023-07-24 5:30 ` [PATCH 2/5] Input: tca6416-keypad - rely on I2C core to set up suspend/resume Dmitry Torokhov
2023-07-24 5:30 ` Dmitry Torokhov [this message]
2023-07-24 5:30 ` [PATCH 4/5] Input: tca6416-keypad - convert to use devm_* api Dmitry Torokhov
2023-07-24 5:30 ` [PATCH 5/5] Input: tca6416-keypad - switch to using input core's polling features Dmitry Torokhov
2023-07-25 19:43 ` Silvan Jegen
2023-07-25 19:50 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230724053024.352054-3-dmitry.torokhov@gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=frank.li@vivo.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).