[PATCH v2] dmaengine: ste_dma40: use devm_request_irq to avoid missing free_irq() in error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



free_irq() is missing in some cases of error in d40_probe(), use
devm_request_irq to fix that.

Fixes: d7b7ecce4bcb ("ste_dma40: Rename a jump label in d40_probe()")
Signed-off-by: ruanjinjie <ruanjinjie@xxxxxxxxxx>
---
v2:
- use devm_request_irq instead of adding free_irq() to fix the problem.
---
 drivers/dma/ste_dma40.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index f093e08c23b1..3214d2cb027e 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -3598,7 +3598,7 @@ static int __init d40_probe(struct platform_device *pdev)
 
 	base->irq = platform_get_irq(pdev, 0);
 
-	ret = request_irq(base->irq, d40_handle_interrupt, 0, D40_NAME, base);
+	ret = devm_request_irq(&pdev->dev, base->irq, d40_handle_interrupt, 0, D40_NAME, base);
 	if (ret) {
 		d40_err(&pdev->dev, "No IRQ defined\n");
 		goto destroy_cache;
-- 
2.25.1




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux