mirror of https://github.com/torvalds/linux.git
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:
parent
1dd6300883
commit
2b74aea6d0
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue