mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 22:02:28 +00:00
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:
parent
fc5b764bef
commit
df20385302
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user