dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Dinghao Liu <dinghao.liu@zju.edu.cn>, <kjlu@umn.edu>
Cc: Vinod Koul <vkoul@kernel.org>,
	Dan Williams <dan.j.williams@intel.com>,
	Chuhong Yuan <hslester96@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Colin Ian King <colin.king@canonical.com>,
	YueHaibing <yuehaibing@huawei.com>, <dmaengine@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dmaengine: ti: edma: Fix runtime PM imbalance on error
Date: Mon, 25 May 2020 11:40:14 +0300	[thread overview]
Message-ID: <cec177bf-3465-01a5-febb-00d78e8e27b0@ti.com> (raw)
In-Reply-To: <20200521084634.31966-1-dinghao.liu@zju.edu.cn>

[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]



On 21/05/2020 11.46, Dinghao Liu wrote:
> pm_runtime_get_sync() increments the runtime PM usage counter even
> when it returns an error code. Thus a pairing decrement is needed on
> the error handling path to keep the counter balanced.

Thank you for the patch!

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

> Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
> ---
>  drivers/dma/ti/edma.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c
> index c4a5c170c1f9..609ce2607eb7 100644
> --- a/drivers/dma/ti/edma.c
> +++ b/drivers/dma/ti/edma.c
> @@ -2402,8 +2402,7 @@ static int edma_probe(struct platform_device *pdev)
>  	ret = pm_runtime_get_sync(dev);
>  	if (ret < 0) {
>  		dev_err(dev, "pm_runtime_get_sync() failed\n");
> -		pm_runtime_disable(dev);
> -		return ret;
> +		goto err_disable_pm;
>  	}
>  
>  	/* Get eDMA3 configuration from IP */
> 

- Péter

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

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 1783 bytes --]

      reply	other threads:[~2020-05-25  8:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21  8:46 [PATCH] dmaengine: ti: edma: Fix runtime PM imbalance on error Dinghao Liu
2020-05-25  8:40 ` Peter Ujfalusi [this message]

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=cec177bf-3465-01a5-febb-00d78e8e27b0@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=arnd@arndb.de \
    --cc=colin.king@canonical.com \
    --cc=dan.j.williams@intel.com \
    --cc=dinghao.liu@zju.edu.cn \
    --cc=dmaengine@vger.kernel.org \
    --cc=hslester96@gmail.com \
    --cc=kjlu@umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vkoul@kernel.org \
    --cc=yuehaibing@huawei.com \
    /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;
as well as URLs for NNTP newsgroup(s).