spi: spi-pci1xxxx: Fix error code in probe

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

Fixes: b4608e9441 ("spi: spi-pci1xxxx: Fix Probe failure with Dual SPI instance with INTx interrupts")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Thangaraj Samynathan <thangaraj.s@microchip.com>
Link: https://patch.msgid.link/aEKvDrUxD19GWi0u@stanley.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Dan Carpenter 2025-06-06 12:04:14 +03:00 committed by Mark Brown
parent 1dd6300883
commit 2b74aea6d0
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 1 additions and 1 deletions

View File

@ -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);