Commit df203853 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown

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

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

Fixes: 3e7cfd6a ("spi: mchp-pci1xxxx: Add support for DMA in SPI")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://msgid.link/r/efc92197-4023-4bfe-bc63-452e7ed112e8@moroto.mountainSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent fc5b764b
......@@ -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));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment