From patchwork Wed Aug 10 03:17:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9272551 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E5965600CB for ; Wed, 10 Aug 2016 03:19:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B16A62832B for ; Wed, 10 Aug 2016 03:19:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A425F28404; Wed, 10 Aug 2016 03:19:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2D39C2832B for ; Wed, 10 Aug 2016 03:19:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bXK1W-00023X-An; Wed, 10 Aug 2016 03:17:42 +0000 Received: from mail-pa0-x242.google.com ([2607:f8b0:400e:c03::242]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bXK1S-00020w-BA for linux-arm-kernel@lists.infradead.org; Wed, 10 Aug 2016 03:17:39 +0000 Received: by mail-pa0-x242.google.com with SMTP id vy10so1981000pac.0 for ; Tue, 09 Aug 2016 20:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JFo8fAW4SyfpokM9liBabb9y+NpkujyVsGoKQDl/6eU=; b=IX4hzdfcpXMhqyi221nzPIDXPnmVhrz47G3Vhxt1c42uOYIJk9XTsTGoK7lfHZwlne 1uLMsmNZwysZAlumHfRpwiRNJuvNH5HC1+nbd39nIizN4XtHAWF7f+A+apkFLJE7DxH+ CP34Qt+fqdEeBQyKo5JuNFqHxF158BqES3rGfXl6iLDr3G9VFmQP/PAMfv7XlvoaEdeH kkBPJE2c1YDRHJtO17u9Y+jaoo9nBVxlPKR56uL6dE38vyWrOlKTimDSmQR3TUhhIuYp 0LmYeJQGrsw+tfgQs2fTanMN0da/XfVUwE+Ss/Mf85+QlsDyP5WuUzoOyy9W7RaTOvpz HhOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JFo8fAW4SyfpokM9liBabb9y+NpkujyVsGoKQDl/6eU=; b=CnL4NXF2RqBFEppIV4ooHpdfs88r8c61+Bdb1kCUo90wQDOQZPeDhNvrzgYXEKhnCW oJXar52EgJnTjsxEAE+po6+dCf1T9R1czyi3wCMf4cEsLj6IMs1pFPbRG5QYdzT9p+gY HPUAlsLkiXF+R/Hy8stYE6L4hzNxp1kSXNhgUdeymzEytXOzXyAWQ4oFFCeA8MXnSdx0 NtgfWS434ucTQDa+AgzokGvw0Xfpr8gSas+arPaPjf55bbYdYEUHAeweT3i+SJITeoYo 9bNOoQflcAnaFu+SgFEp8yxWtRtKKgSaXFAMYr6GvIlhQPKB9zQMSt1b26/Ldy0nLZnh hmug== X-Gm-Message-State: AEkoouuAbhClkU8d3APjk0Aiw65eTRDC2yrzgRs7KanQmxCL6jYGGULYheLP3U6C7XdsyA== X-Received: by 10.66.216.69 with SMTP id oo5mr2985781pac.155.1470799036885; Tue, 09 Aug 2016 20:17:16 -0700 (PDT) Received: from bogon.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id q14sm59158018pfi.76.2016.08.09.20.17.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Aug 2016 20:17:16 -0700 (PDT) From: Wei Yongjun To: Ludovic Desroches , Vinod Koul , Dan Williams Subject: [PATCH -next] dmaengine: at_xdmac: fix to pass correct device identity to free_irq() Date: Wed, 10 Aug 2016 03:17:09 +0000 Message-Id: <1470799029-2613-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160809_201738_478401_A21F28D7 X-CRM114-Status: GOOD ( 12.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dmaengine@vger.kernel.org, Wei Yongjun , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP free_irq() expects the same device identity that was passed to corresponding request_irq(), otherwise the IRQ is not freed. Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver") Signed-off-by: Wei Yongjun Acked-by: Ludovic Desroches --- drivers/dma/at_xdmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index 2badc57..b7d7f2d 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c @@ -2067,7 +2067,7 @@ err_dma_unregister: err_clk_disable: clk_disable_unprepare(atxdmac->clk); err_free_irq: - free_irq(atxdmac->irq, atxdmac->dma.dev); + free_irq(atxdmac->irq, atxdmac); return ret; } @@ -2081,7 +2081,7 @@ static int at_xdmac_remove(struct platform_device *pdev) dma_async_device_unregister(&atxdmac->dma); clk_disable_unprepare(atxdmac->clk); - free_irq(atxdmac->irq, atxdmac->dma.dev); + free_irq(atxdmac->irq, atxdmac); for (i = 0; i < atxdmac->dma.chancnt; i++) { struct at_xdmac_chan *atchan = &atxdmac->chan[i];