Skip to content

Commit 976dc5f

Browse files
Yang YingliangMani-Sadhasivam
authored andcommitted
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]>
1 parent aebfdfe commit 976dc5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/endpoint/functions/pci-epf-vntb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,7 @@ static int pci_vntb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
12581258
ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
12591259
if (ret) {
12601260
dev_err(dev, "Cannot set DMA mask\n");
1261-
return -EINVAL;
1261+
return ret;
12621262
}
12631263

12641264
ret = ntb_register_device(&ndev->ntb);

0 commit comments

Comments
 (0)