vmw_pvscsi: handle the return value from pci_alloc_irq_vectors correctly
Subsystems (2)
PATCH 1/1 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]>
--- drivers/scsi/vmw_pvscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/vmw_pvscsi.c +1 -1
@@ -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);
Signature · 1 line
2.11.0
Martin K. Petersen
AppliedQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Christoph" == Christoph Hellwig <[email protected]> writes:
Christoph> It returns the number of vectors allocated when successful, Christoph> so check for a negative error only.
Applied to 4.11/scsi-fixes.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering