mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
scsi: vmw_pvscsi: handle the return value from pci_alloc_irq_vectors correctly
It returns the number of vectors allocated when successful, so check for
a negative error only.
Fixes: 2e48e349 ("scsi: vmw_pvscsi: switch to pci_alloc_irq_vectors")
Signed-off-by: Christoph Hellwig <[email protected]>
Reported-by: Loïc Yhuel <[email protected]>
Tested-by: Loïc Yhuel <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
This commit is contained in:
parent
23456565ac
commit
c527de41ae
1 changed files with 1 additions and 1 deletions
|
|
@ -1487,7 +1487,7 @@ static int pvscsi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
irq_flag &= ~PCI_IRQ_MSI;
|
||||
|
||||
error = pci_alloc_irq_vectors(adapter->dev, 1, 1, irq_flag);
|
||||
if (error)
|
||||
if (error < 0)
|
||||
goto out_reset_adapter;
|
||||
|
||||
adapter->use_req_threshold = pvscsi_setup_req_threshold(adapter, true);
|
||||
|
|
|
|||
Loading…
Reference in a new issue