Skip to contentSkip to conversation

rtc: mt6397: drop free_irq of devm_ allocated irq

PATCH Applied Wei Yongjun 2 participants 2 messages Nov 13, 2019 – Dec 10, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtc: mt6397: drop free_irq of devm_ allocated irq

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")
---
 drivers/rtc/rtc-mt6397.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/rtc/rtc-mt6397.c +1 -9
index 5249fc99fd5f..6c585cd1ce10 100644
@@ -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
maintainer Applied
#1 lore raw
Quoted 11 lines · Wei Yongjun

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")
---
 drivers/rtc/rtc-mt6397.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

Applied, thanks.

Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com