提交 c527de41 编写于 作者: C Christoph Hellwig 提交者: Martin K. Petersen

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: NChristoph Hellwig <hch@lst.de>
Reported-by: NLoïc Yhuel <loic.yhuel@gmail.com>
Tested-by: NLoïc Yhuel <loic.yhuel@gmail.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 23456565
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册