lkml.org 
[lkml]   [2020]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Re: [PATCH] PCI: qcom: fix runtime pm imbalance on error
> > 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.
> >
> > Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
> > ---
> > drivers/pci/controller/dwc/pcie-qcom.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> > index 138e1a2d21cc..35686930df1d 100644
> > --- a/drivers/pci/controller/dwc/pcie-qcom.c
> > +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> > @@ -1340,8 +1340,7 @@ static int qcom_pcie_probe(struct platform_device *pdev)
> > pm_runtime_enable(dev);
> > ret = pm_runtime_get_sync(dev);
> > if (ret < 0) {
> > - pm_runtime_disable(dev);
> > - return ret;
> > + goto err_pm_runtime_put;
>
> I think you need to remove the brackets - this become a single line
> if statement.
>

Thank you for your advice! I will fix this in the next version of patch.

Regards,
Dinghao
\
 
 \ /
  Last update: 2020-07-07 04:19    [W:0.247 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site