dmaengine Archive on lore.kernel.org
 help / color / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
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>,
	"open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM" 
	<dmaengine@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dmaengine: ti: omap-dma: Add cleanup in omap_dma_probe()
Date: Fri, 16 Aug 2019 10:22:40 +0300
Message-ID: <2e9382ff-1940-2247-4335-a5c1229d2cee@ti.com> (raw)
In-Reply-To: <1565938570-7528-1-git-send-email-wenwen@cs.uga.edu>



On 16/08/2019 9.56, Wenwen Wang wrote:
> 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.

Thank you,
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> 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)
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

  reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-16  6:56 Wenwen Wang
2019-08-16  7:22 ` Peter Ujfalusi [this message]
2019-08-20 11:44 ` Vinod Koul

Reply instructions:

You may reply publically 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=2e9382ff-1940-2247-4335-a5c1229d2cee@ti.com \
    --to=peter.ujfalusi@ti.com \
    --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 \
    --cc=wenwen@cs.uga.edu \
    /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

dmaengine Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dmaengine/0 dmaengine/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dmaengine dmaengine/ https://lore.kernel.org/dmaengine \
		dmaengine@vger.kernel.org dmaengine@archiver.kernel.org
	public-inbox-index dmaengine


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.dmaengine


AGPL code for this site: git clone https://public-inbox.org/ public-inbox