linux-i3c.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] i3c: master: svc: drop free_irq of devm_request_irq allocated irq
@ 2021-05-18 13:11 Yang Yingliang
  2021-05-27 10:01 ` Miquel Raynal
  0 siblings, 1 reply; 5+ messages in thread
From: Yang Yingliang @ 2021-05-18 13:11 UTC (permalink / raw)
  To: linux-kernel, linux-i3c; +Cc: alexandre.belloni

irq allocated with devm_request_irq should not be freed using
free_irq, because doing so causes a dangling pointer, and a
subsequent double free.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/i3c/master/svc-i3c-master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index 1f6ba4221817..761c9c468357 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -1448,7 +1448,7 @@ static int svc_i3c_master_remove(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	free_irq(master->irq, master);
+	devm_free_irq(&pdev->dev, master->irq, master);
 	clk_disable_unprepare(master->pclk);
 	clk_disable_unprepare(master->fclk);
 	clk_disable_unprepare(master->sclk);
-- 
2.25.1


-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

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

end of thread, other threads:[~2021-06-04 20:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 13:11 [PATCH -next] i3c: master: svc: drop free_irq of devm_request_irq allocated irq Yang Yingliang
2021-05-27 10:01 ` Miquel Raynal
2021-05-27 13:49   ` Yang Yingliang
2021-05-27 14:40     ` Miquel Raynal
2021-05-28  1:43       ` Yang Yingliang

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