diff options
| author | Felix Gu <ustc.gu@gmail.com> | 2026-05-29 21:54:31 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-06-08 21:04:40 +0300 |
| commit | af4310929afcd500df6b75a5fccff85ce13cc90d (patch) | |
| tree | a3b390d03502c4acac9dab91bc4ff529550dd2ab | |
| parent | 7886054b06f762f62054957a8f6de0f14e6b7541 (diff) | |
| download | linux-af4310929afcd500df6b75a5fccff85ce13cc90d.tar.xz | |
spi: dw-pci: remove redundant pci_free_irq_vectors() calls
The driver uses pcim_enable_device(), so IRQ vectors are automatically
freed by devres on driver detach. The explicit pci_free_irq_vectors()
calls in the probe error path and remove function are redundant.
Drop them and the now-unused error label.
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Link: https://patch.msgid.link/20260530-dw-pci-v1-1-5d2cf798b3c3@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | drivers/spi/spi-dw-pci.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/spi/spi-dw-pci.c b/drivers/spi/spi-dw-pci.c index 7f002d5e5b88..bfb874f96a26 100644 --- a/drivers/spi/spi-dw-pci.c +++ b/drivers/spi/spi-dw-pci.c @@ -120,16 +120,15 @@ static int dw_spi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *en if (desc->setup) { ret = desc->setup(dws); if (ret) - goto err_free_irq_vectors; + return ret; } } else { - ret = -ENODEV; - goto err_free_irq_vectors; + return -ENODEV; } ret = dw_spi_add_controller(&pdev->dev, dws); if (ret) - goto err_free_irq_vectors; + return ret; /* PCI hook and SPI hook use the same drv data */ pci_set_drvdata(pdev, dws); @@ -143,10 +142,6 @@ static int dw_spi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *en pm_runtime_allow(&pdev->dev); return 0; - -err_free_irq_vectors: - pci_free_irq_vectors(pdev); - return ret; } static void dw_spi_pci_remove(struct pci_dev *pdev) @@ -157,7 +152,6 @@ static void dw_spi_pci_remove(struct pci_dev *pdev) pm_runtime_get_noresume(&pdev->dev); dw_spi_remove_controller(dws); - pci_free_irq_vectors(pdev); } #ifdef CONFIG_PM_SLEEP |
