aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Yingliang <[email protected]>2023-12-01 11:30:57 +0800
committerManivannan Sadhasivam <[email protected]>2024-02-16 16:14:01 +0530
commit976dc5ff3018552dcfe58018a0cfdf6376318117 (patch)
tree5f683a0f3c3ebd2186d62122c7d6237835217f63
parentaebfdfe39b9327a3077d0df8db3beb3160c9bdd0 (diff)
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: Yang Yingliang <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Reviewed-by: Dave Jiang <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Link: https://lore.kernel.org/r/[email protected] [mani: reworded commit message and subject] Signed-off-by: Manivannan Sadhasivam <[email protected]>
-rw-r--r--drivers/pci/endpoint/functions/pci-epf-vntb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c
index d4c25b43da23..0675929fc529 100644
--- a/drivers/pci/endpoint/functions/pci-epf-vntb.c
+++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c
@@ -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);