Commit 976dc5ff authored by Yang Yingliang's avatar Yang Yingliang Committed by Manivannan Sadhasivam

PCI: epf-vntb: Return actual error code during pci_vntb_probe() failure

If dma_set_mask_and_coherent() in pci_vntb_probe() fails, return the actual
error code instead of -EINVAL.
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: default avatarDave Jiang <dave.jiang@intel.com>
Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20231201033057.1399131-2-yangyingliang@huaweicloud.com
[mani: reworded commit message and subject]
Signed-off-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
parent aebfdfe3
......@@ -1258,7 +1258,7 @@ static int pci_vntb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
if (ret) {
dev_err(dev, "Cannot set DMA mask\n");
return -EINVAL;
return ret;
}
ret = ntb_register_device(&ndev->ntb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment