From: Dejin Zheng <zhengdejin5@gmail.com>
To: Gustavo Pimentel <Gustavo.Pimentel@synopsys.com>
Cc: "vkoul@kernel.org" <vkoul@kernel.org>,
"wangzhou1@hisilicon.com" <wangzhou1@hisilicon.com>,
"ftoth@exalondelft.nl" <ftoth@exalondelft.nl>,
"andy.shevchenko@gmail.com" <andy.shevchenko@gmail.com>,
"qiuzhenfa@hisilicon.com" <qiuzhenfa@hisilicon.com>,
"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] dmaengine: dw-edma: Add missing call to 'pci_free_irq_vectors()' in probe function
Date: Mon, 15 Feb 2021 20:46:06 +0800 [thread overview]
Message-ID: <20210215124606.GC618076@nuc8i5> (raw)
In-Reply-To: <DM5PR12MB18357590D1A8C22A1E7287BCDA889@DM5PR12MB1835.namprd12.prod.outlook.com>
On Mon, Feb 15, 2021 at 09:45:07AM +0000, Gustavo Pimentel wrote:
> On Sun, Feb 14, 2021 at 13:21:52, Dejin Zheng <zhengdejin5@gmail.com>
> wrote:
>
> > Call to 'pci_free_irq_vectors()' is missing in the error handling path
> > of the probe function, So add it.
> >
> > Fixes: 41aaff2a2ac01c5 ("dmaengine: Add Synopsys eDMA IP PCIe glue-logic")
> > Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
> > ---
> > drivers/dma/dw-edma/dw-edma-pcie.c | 15 +++++++++++----
> > 1 file changed, 11 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/dma/dw-edma/dw-edma-pcie.c b/drivers/dma/dw-edma/dw-edma-pcie.c
> > index 1eafc602e17e..c1e796bd3ee9 100644
> > --- a/drivers/dma/dw-edma/dw-edma-pcie.c
> > +++ b/drivers/dma/dw-edma/dw-edma-pcie.c
> > @@ -185,24 +185,31 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
> > /* Validating if PCI interrupts were enabled */
> > if (!pci_dev_msi_enabled(pdev)) {
> > pci_err(pdev, "enable interrupt failed\n");
> > - return -EPERM;
> > + err = -EPERM;
> > + goto err_free_irq;
> > }
> >
> > dw->irq = devm_kcalloc(dev, nr_irqs, sizeof(*dw->irq), GFP_KERNEL);
> > - if (!dw->irq)
> > - return -ENOMEM;
> > + if (!dw->irq) {
> > + err = -ENOMEM;
> > + goto err_free_irq;
> > + }
> >
> > /* Starting eDMA driver */
> > err = dw_edma_probe(chip);
> > if (err) {
> > pci_err(pdev, "eDMA probe failed\n");
> > - return err;
> > + goto err_free_irq;
> > }
> >
> > /* Saving data structure reference */
> > pci_set_drvdata(pdev, chip);
> >
> > return 0;
> > +
> > +err_free_irq:
> > + pci_free_irq_vectors(pdev);
> > + return err;
> > }
> >
> > static void dw_edma_pcie_remove(struct pci_dev *pdev)
> > --
> > 2.25.0
>
> Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
>
>
Gustavo, Thanks!
Dejin
next prev parent reply other threads:[~2021-02-15 12:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-14 13:21 [PATCH 0/3] Add missing call to 'pci_free_irq_vectors()' Dejin Zheng
2021-02-14 13:21 ` [PATCH 1/3] dmaengine: hsu: Add missing call to 'pci_free_irq_vectors()' in probe and remove functions Dejin Zheng
2021-02-15 13:25 ` Andy Shevchenko
2021-02-14 13:21 ` [PATCH 2/3] dmaengine: dw-edma: Add missing call to 'pci_free_irq_vectors()' in probe function Dejin Zheng
2021-02-15 9:45 ` Gustavo Pimentel
2021-02-15 12:46 ` Dejin Zheng [this message]
2021-02-14 13:21 ` [PATCH 3/3] dmaengine: hisilicon: " Dejin Zheng
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=20210215124606.GC618076@nuc8i5 \
--to=zhengdejin5@gmail.com \
--cc=Gustavo.Pimentel@synopsys.com \
--cc=andy.shevchenko@gmail.com \
--cc=dmaengine@vger.kernel.org \
--cc=ftoth@exalondelft.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=qiuzhenfa@hisilicon.com \
--cc=vkoul@kernel.org \
--cc=wangzhou1@hisilicon.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).