linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: tc3589x: Use devm_request_threaded_irq() to fix  the missing undo bug
@ 2020-06-06 14:39 Chuhong Yuan
  0 siblings, 0 replies; only message in thread
From: Chuhong Yuan @ 2020-06-06 14:39 UTC (permalink / raw)
  Cc: Lee Jones, Samuel Ortiz, Sundar Iyer, Linus Walleij,
	linux-kernel, Chuhong Yuan

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-06 14:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-06 14:39 [PATCH] mfd: tc3589x: Use devm_request_threaded_irq() to fix the missing undo bug Chuhong Yuan

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).