Skip to content

Commit 2b74aea

Browse files
Dan Carpenterbroonie
authored andcommitted
spi: spi-pci1xxxx: Fix error code in probe
Return the error code if pci_alloc_irq_vectors() fails. Don't return success. Fixes: b4608e9 ("spi: spi-pci1xxxx: Fix Probe failure with Dual SPI instance with INTx interrupts") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Thangaraj Samynathan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 1dd6300 commit 2b74aea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/spi/spi-pci1xxxx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ static int pci1xxxx_spi_probe(struct pci_dev *pdev, const struct pci_device_id *
765765
PCI_IRQ_ALL_TYPES);
766766
if (num_vector < 0) {
767767
dev_err(&pdev->dev, "Error allocating MSI vectors\n");
768-
return ret;
768+
return num_vector;
769769
}
770770

771771
init_completion(&spi_sub_ptr->spi_xfer_done);

0 commit comments

Comments
 (0)