All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: Dinghao Liu <dinghao.liu@zju.edu.cn>, kjlu@umn.edu
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Rob Herring <robh@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: rcar: fix runtime pm imbalance on error
Date: Sat, 6 Jun 2020 14:15:28 +0200	[thread overview]
Message-ID: <5cf73d31-33ab-b9ba-c9d5-faa3977484eb@gmail.com> (raw)
In-Reply-To: <20200520082228.26881-1-dinghao.liu@zju.edu.cn>

On 5/20/20 10:22 AM, Dinghao Liu wrote:
> pm_runtime_get_sync() increments the runtime PM usage counter even
> it returns an error code. Thus a pairing decrement is needed on
> the error handling path to keep the counter balanced.

Sorry for the late reply.

> Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
> ---
>  drivers/pci/controller/pcie-rcar.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
> index 759c6542c5c8..a9de65438051 100644
> --- a/drivers/pci/controller/pcie-rcar.c
> +++ b/drivers/pci/controller/pcie-rcar.c
> @@ -1207,9 +1207,8 @@ static int rcar_pcie_probe(struct platform_device *pdev)
>  	irq_dispose_mapping(pcie->msi.irq1);
>  
>  err_pm_put:

You might want to remove this label too.
I'm not runtime-pm expert to comment on the validity of this patch though.

> -	pm_runtime_put(dev);
> -
>  err_pm_disable:
> +	pm_runtime_put(dev);
>  	pm_runtime_disable(dev);
>  	pci_free_resource_list(&pcie->resources);
>  
> 

  reply	other threads:[~2020-06-06 12:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20  8:22 [PATCH] PCI: rcar: fix runtime pm imbalance on error Dinghao Liu
2020-06-06 12:15 ` Marek Vasut [this message]
2020-06-07  6:18   ` dinghao.liu

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=5cf73d31-33ab-b9ba-c9d5-faa3977484eb@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=dinghao.liu@zju.edu.cn \
    --cc=kjlu@umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=robh@kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.