From patchwork Wed Nov 16 06:57:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjie Ruan X-Patchwork-Id: 13044445 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1B7C9C4332F for ; Wed, 16 Nov 2022 07:02:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=fr6YOSTvfSSTdxzMWCv5yTXrG0g5vB5mOosNqANpNnM=; b=ZQzBrWojU2sPz8 4GwFhnFbh/4jEje/CNS++Lq/t4QNK8BaI0ANTB2IwJS6h4wFR3O1hdZNXYs0QeORBRAOx3Y22WA0P LdzWOVrFvxlfb7vQUZslTAeD51IBoEjG8u6CpmUA6gnojL6+B29CtBEXCfzaCkliydzRspbhbhw9z rS5g0beUL7ukzjebNHhoJGRopwUu+UboDUHgkGf5OOM8qRDF4r7GX+fUIZyYg+ZejSOG58eulrvrc h1C2Ts6NqRfEa0ICl6CpPuwu85JSvF8e12b8MP6Lj2yrse2YlQb6w+wFLv1Rsxx+fF2XUg23KgfXU O7r9yQnBlTjgDmzspWCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovCPa-000Oou-LD; Wed, 16 Nov 2022 07:00:42 +0000 Received: from szxga03-in.huawei.com ([45.249.212.189]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovCPW-000Ojr-8g for linux-arm-kernel@lists.infradead.org; Wed, 16 Nov 2022 07:00:40 +0000 Received: from kwepemi500008.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4NBv4K1RdpzJnlG; Wed, 16 Nov 2022 14:57:21 +0800 (CST) Received: from huawei.com (10.67.175.83) by kwepemi500008.china.huawei.com (7.221.188.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 16 Nov 2022 15:00:29 +0800 From: ruanjinjie To: , , , , CC: Subject: [PATCH v2] dmaengine: ste_dma40: use devm_request_irq to avoid missing free_irq() in error path Date: Wed, 16 Nov 2022 14:57:17 +0800 Message-ID: <20221116065717.3069712-1-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.67.175.83] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi500008.china.huawei.com (7.221.188.139) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221115_230038_497959_29A3F9C9 X-CRM114-Status: UNSURE ( 9.47 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Linus Walleij --- 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;