[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <efc92197-4023-4bfe-bc63-452e7ed112e8@moroto.mountain>
Date: Tue, 13 Feb 2024 21:07:45 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Thangaraj Samynathan <thangaraj.s@...rochip.com>
Cc: Mark Brown <broonie@...nel.org>, linux-spi@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH] spi: mchp-pci1xxxx: release resources on error in probe()
Call pci_release_regions(pdev) before returning on this error path.
Fixes: 3e7cfd6ad29a ("spi: mchp-pci1xxxx: Add support for DMA in SPI")
Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
---
>From static analysis. Not tested.
drivers/spi/spi-pci1xxxx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-pci1xxxx.c b/drivers/spi/spi-pci1xxxx.c
index a99db6163aec..969965d7bc98 100644
--- a/drivers/spi/spi-pci1xxxx.c
+++ b/drivers/spi/spi-pci1xxxx.c
@@ -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));
--
2.43.0
Powered by blists - more mailing lists