From: Wenwen Wang <wenwen@cs.uga.edu>
To: Wenwen Wang <wenwen@cs.uga.edu>
Cc: Vinod Koul <vkoul@kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
Enrico Weigelt <info@metux.net>,
Allison Randal <allison@lohutok.net>,
Kate Stewart <kstewart@linuxfoundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
dmaengine@vger.kernel.org (open list:DMA GENERIC OFFLOAD ENGINE
SUBSYSTEM), linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] dmaengine: ti: omap-dma: Add cleanup in omap_dma_probe()
Date: Fri, 16 Aug 2019 01:56:08 -0500 [thread overview]
Message-ID: <1565938570-7528-1-git-send-email-wenwen@cs.uga.edu> (raw)
If devm_request_irq() fails to disable all interrupts, no cleanup is
performed before retuning the error. To fix this issue, invoke
omap_dma_free() to do the cleanup.
Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
---
drivers/dma/ti/omap-dma.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/ti/omap-dma.c b/drivers/dma/ti/omap-dma.c
index ba2489d..5158b58 100644
--- a/drivers/dma/ti/omap-dma.c
+++ b/drivers/dma/ti/omap-dma.c
@@ -1540,8 +1540,10 @@ static int omap_dma_probe(struct platform_device *pdev)
rc = devm_request_irq(&pdev->dev, irq, omap_dma_irq,
IRQF_SHARED, "omap-dma-engine", od);
- if (rc)
+ if (rc) {
+ omap_dma_free(od);
return rc;
+ }
}
if (omap_dma_glbl_read(od, CAPS_0) & CAPS_0_SUPPORT_LL123)
--
2.7.4
next reply other threads:[~2019-08-16 6:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-16 6:56 Wenwen Wang [this message]
2019-08-16 7:22 ` [PATCH] dmaengine: ti: omap-dma: Add cleanup in omap_dma_probe() Peter Ujfalusi
2019-08-20 11:44 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1565938570-7528-1-git-send-email-wenwen@cs.uga.edu \
--to=wenwen@cs.uga.edu \
--cc=allison@lohutok.net \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=info@metux.net \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox