mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] mfd:tc3589:fix a potential resource leak
@ 2026-01-09 16:27 Felix Gu
  2026-01-09 17:20 ` Markus Elfring
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Gu @ 2026-01-09 16:27 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Felix Gu

Use devm_request_threaded_irq to repalce request_threaded_irq to avoid
a potential resource leak.

Signed-off-by: Felix Gu <gu_0233@qq.com>
---
Changes in v2:
- Fix format.
- Link to v1: https://lore.kernel.org/lkml/tencent_EFCFAE871E8872447FF88F99091A51701D08@qq.com/
---
 drivers/mfd/tc3589x.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c
index 2d4eb771e230..f673ee4e1d16 100644
--- a/drivers/mfd/tc3589x.c
+++ b/drivers/mfd/tc3589x.c
@@ -410,9 +410,10 @@ 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(tc3589x->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;

---
base-commit: 3d845d25026c5b1050e927e3ee4c515977a9b490
change-id: 20251226-tc3589x-fix-50ce3358c7bf

Best regards,
-- 
Felix Gu <gu_0233@qq.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] mfd:tc3589:fix a potential resource leak
  2026-01-09 16:27 [PATCH v2] mfd:tc3589:fix a potential resource leak Felix Gu
@ 2026-01-09 17:20 ` Markus Elfring
  0 siblings, 0 replies; 2+ messages in thread
From: Markus Elfring @ 2026-01-09 17:20 UTC (permalink / raw)
  To: Felix Gu, Lee Jones; +Cc: LKML, kernel-janitors

> Use devm_request_threaded_irq to repalce request_threaded_irq to avoid

                                   replace?


Would it be helpful to append parentheses to function names?


> a potential resource leak.

How do you think about to add any tags (like “Fixes” and “Cc”) accordingly?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.19-rc4#n145

Regards,
Markus

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-09 17:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-09 16:27 [PATCH v2] mfd:tc3589:fix a potential resource leak Felix Gu
2026-01-09 17:20 ` Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®