spi: mchp-pci1xxxx: release resources on error in probe()

Call pci_release_regions(pdev) before returning on this error path.

Fixes: 3e7cfd6ad2 ("spi: mchp-pci1xxxx: Add support for DMA in SPI")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://msgid.link/r/efc92197-4023-4bfe-bc63-452e7ed112e8@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Dan Carpenter 2024-02-13 21:07:45 +03:00 committed by Mark Brown
parent fc5b764bef
commit df20385302
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -776,7 +776,7 @@ static int pci1xxxx_spi_probe(struct pci_dev *pdev, const struct pci_device_id *
ret = pci1xxxx_spi_dma_init(spi_bus, spi_sub_ptr->irq);
if (ret && ret != -EOPNOTSUPP)
return ret;
goto error;
/* This register is only applicable for 1st instance */
regval = readl(spi_bus->reg_base + SPI_PCI_CTRL_REG_OFFSET(0));