Message ID | 20170303145716.19655-1-hch@lst.de (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
>>>>> "Christoph" == Christoph Hellwig <hch@lst.de> 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.
diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c index ef474a748744..c374e3b5c678 100644 --- a/drivers/scsi/vmw_pvscsi.c +++ b/drivers/scsi/vmw_pvscsi.c @@ -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);