[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210215124606.GC618076@nuc8i5>
Date: Mon, 15 Feb 2021 20:46:06 +0800
From: Dejin Zheng <zhengdejin5@...il.com>
To: Gustavo Pimentel <Gustavo.Pimentel@...opsys.com>
Cc: "vkoul@...nel.org" <vkoul@...nel.org>,
"wangzhou1@...ilicon.com" <wangzhou1@...ilicon.com>,
"ftoth@...londelft.nl" <ftoth@...londelft.nl>,
"andy.shevchenko@...il.com" <andy.shevchenko@...il.com>,
"qiuzhenfa@...ilicon.com" <qiuzhenfa@...ilicon.com>,
"dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] dmaengine: dw-edma: Add missing call to
'pci_free_irq_vectors()' in probe function
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@...il.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@...il.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@...opsys.com>
>
>
Gustavo, Thanks!
Dejin
Powered by blists - more mailing lists