From: Chuhong Yuan <hslester96@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Lee Jones <lee.jones@linaro.org>,
Samuel Ortiz <sameo@linux.intel.com>,
Sundar Iyer <sundar.iyer@stericsson.com>,
Linus Walleij <linus.walleij@stericsson.com>,
linux-kernel@vger.kernel.org, Chuhong Yuan <hslester96@gmail.com>
Subject: [PATCH] mfd: tc3589x: Use devm_request_threaded_irq() to fix the missing undo bug
Date: Sat, 6 Jun 2020 22:39:41 +0800 [thread overview]
Message-ID: <20200606143941.2869594-1-hslester96@gmail.com> (raw)
This driver calls request_threaded_irq() in probe, but it misses calling
free_irq() in probe's error handler and remove.
Replace request_threaded_irq() with the devm version to fix it.
Fixes: 20406ebff4a2 ("mfd/tc3589x: rename tc35892 structs/registers to tc359x")
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
---
drivers/mfd/tc3589x.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c
index 67c9995bb1aa..0fd8ba1c68d0 100644
--- a/drivers/mfd/tc3589x.c
+++ b/drivers/mfd/tc3589x.c
@@ -412,9 +412,9 @@ static int tc3589x_probe(struct i2c_client *i2c,
if (ret)
return ret;
- ret = request_threaded_irq(tc3589x->i2c->irq, NULL, tc3589x_irq,
- IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
- "tc3589x", tc3589x);
+ ret = devm_request_threaded_irq(&i2c->dev, tc3589x->i2c->irq, NULL,
+ tc3589x_irq, IRQF_TRIGGER_FALLING |
+ IRQF_ONESHOT, "tc3589x", tc3589x);
if (ret) {
dev_err(tc3589x->dev, "failed to request IRQ: %d\n", ret);
return ret;
--
2.26.2
reply other threads:[~2020-06-06 14:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200606143941.2869594-1-hslester96@gmail.com \
--to=hslester96@gmail.com \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
--cc=sundar.iyer@stericsson.com \
/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).