lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221116065717.3069712-1-ruanjinjie@huawei.com>
Date:   Wed, 16 Nov 2022 14:57:17 +0800
From:   ruanjinjie <ruanjinjie@...wei.com>
To:     <linus.walleij@...aro.org>, <vkoul@...nel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <dmaengine@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:     <ruanjinjie@...wei.com>
Subject: [PATCH v2] dmaengine: ste_dma40: use devm_request_irq to avoid  missing free_irq() in error path

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@...wei.com>
---
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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ