mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH next] spi: spi-pci1xxxx: Fix error code in probe
@ 2025-06-06  9:04 Dan Carpenter
  2025-06-06  9:15 ` Thangaraj.S
  2025-06-09 13:40 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2025-06-06  9:04 UTC (permalink / raw)
  To: Thangaraj Samynathan; +Cc: Mark Brown, linux-spi, linux-kernel, kernel-janitors

Return the error code if pci_alloc_irq_vectors() fails.  Don't return
success.

Fixes: b4608e944177 ("spi: spi-pci1xxxx: Fix Probe failure with Dual SPI instance with INTx interrupts")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 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 c6489e90b8b9..9112d8a1a0c8 100644
--- a/drivers/spi/spi-pci1xxxx.c
+++ b/drivers/spi/spi-pci1xxxx.c
@@ -765,7 +765,7 @@ static int pci1xxxx_spi_probe(struct pci_dev *pdev, const struct pci_device_id *
 							   PCI_IRQ_ALL_TYPES);
 			if (num_vector < 0) {
 				dev_err(&pdev->dev, "Error allocating MSI vectors\n");
-				return ret;
+				return num_vector;
 			}
 
 			init_completion(&spi_sub_ptr->spi_xfer_done);
-- 
2.47.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-09 13:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-06  9:04 [PATCH next] spi: spi-pci1xxxx: Fix error code in probe Dan Carpenter
2025-06-06  9:15 ` Thangaraj.S
2025-06-09 13:40 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®