Skip to content

Commit df20385

Browse files
Dan Carpenterbroonie
authored andcommitted
spi: mchp-pci1xxxx: release resources on error in probe()
Call pci_release_regions(pdev) before returning on this error path. Fixes: 3e7cfd6 ("spi: mchp-pci1xxxx: Add support for DMA in SPI") Signed-off-by: Dan Carpenter <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent fc5b764 commit df20385

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/spi/spi-pci1xxxx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ static int pci1xxxx_spi_probe(struct pci_dev *pdev, const struct pci_device_id *
776776

777777
ret = pci1xxxx_spi_dma_init(spi_bus, spi_sub_ptr->irq);
778778
if (ret && ret != -EOPNOTSUPP)
779-
return ret;
779+
goto error;
780780

781781
/* This register is only applicable for 1st instance */
782782
regval = readl(spi_bus->reg_base + SPI_PCI_CTRL_REG_OFFSET(0));

0 commit comments

Comments
 (0)