All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] rtc: mt6397: drop free_irq of devm_ allocated irq
@ 2019-11-13  2:17 ` Wei Yongjun
  0 siblings, 0 replies; 28+ messages in thread
From: Wei Yongjun @ 2019-11-13  2:17 UTC (permalink / raw)
  To: Eddie Huang, Sean Wang, Alessandro Zummo, Alexandre Belloni,
	Matthias Brugger, Josef Friedl
  Cc: linux-rtc, kernel-janitors, Hulk Robot, linux-mediatek,
	Wei Yongjun, linux-arm-kernel

The devm_request_threaded_irq function allocates irq that is
released when a driver detaches. Thus, there is no reason to
explicitly call free_irq in probe function.

Fixes: 851b87148aa2 ("rtc: mt6397: improvements of rtc driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/rtc/rtc-mt6397.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/rtc/rtc-mt6397.c b/drivers/rtc/rtc-mt6397.c
index 5249fc99fd5f..6c585cd1ce10 100644
--- a/drivers/rtc/rtc-mt6397.c
+++ b/drivers/rtc/rtc-mt6397.c
@@ -286,15 +286,7 @@ static int mtk_rtc_probe(struct platform_device *pdev)
 
 	rtc->rtc_dev->ops = &mtk_rtc_ops;
 
-	ret = rtc_register_device(rtc->rtc_dev);
-	if (ret)
-		goto out_free_irq;
-
-	return 0;
-
-out_free_irq:
-	free_irq(rtc->irq, rtc);
-	return ret;
+	return rtc_register_device(rtc->rtc_dev);
 }
 
 #ifdef CONFIG_PM_SLEEP

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

end of thread, other threads:[~2019-12-10 15:45 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-13  2:17 [PATCH -next] rtc: mt6397: drop free_irq of devm_ allocated irq Wei Yongjun
2019-11-13  2:17 ` Wei Yongjun
2019-11-13  2:17 ` Wei Yongjun
2019-11-13  2:17 ` Wei Yongjun
2019-12-04  2:02 ` [PATCH -next] rtc: mt6397: drop free_irq of devm_xx " Mao Wenan
2019-12-04  2:02   ` Mao Wenan
2019-12-04  2:02   ` Mao Wenan
2019-12-04  2:02   ` Mao Wenan
2019-12-04  6:35   ` Dan Carpenter
2019-12-04  6:35     ` Dan Carpenter
2019-12-04  6:35     ` Dan Carpenter
2019-12-04  6:35     ` Dan Carpenter
2019-12-04  7:28     ` [PATCH v2 " Mao Wenan
2019-12-04  7:28       ` Mao Wenan
2019-12-04  7:28       ` Mao Wenan
2019-12-04  7:28       ` Mao Wenan
2019-12-04  8:40       ` Alexandre Belloni
2019-12-04  8:40         ` Alexandre Belloni
2019-12-04  8:40         ` Alexandre Belloni
2019-12-04  8:40         ` Alexandre Belloni
2019-12-04  8:42         ` Alexandre Belloni
2019-12-04  8:42           ` Alexandre Belloni
2019-12-04  8:42           ` Alexandre Belloni
2019-12-04  8:42           ` Alexandre Belloni
2019-12-10 15:44 ` [PATCH -next] rtc: mt6397: drop free_irq of devm_ " Alexandre Belloni
2019-12-10 15:44   ` Alexandre Belloni
2019-12-10 15:44   ` Alexandre Belloni
2019-12-10 15:44   ` Alexandre Belloni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.