Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

PCI: endpoint: Propagate error from pci_epf_create()

pci_epf_make() overwrites the actual error returned by pci_epf_create()
with -EINVAL, which hides the real failure reason. Use PTR_ERR(epf) instead
and print the error code.

Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://patch.msgid.link/20260227030701.40533-1-alok.a.tiwari@oracle.com

authored by

Alok Tiwari and committed by
Manivannan Sadhasivam
0b74f7d7 88ce49ab

+2 -2
+2 -2
drivers/pci/endpoint/pci-ep-cfs.c
··· 624 624 625 625 epf = pci_epf_create(epf_name); 626 626 if (IS_ERR(epf)) { 627 - pr_err("failed to create endpoint function device\n"); 628 - err = -EINVAL; 627 + err = PTR_ERR(epf); 628 + pr_err("failed to create endpoint function device: %d\n", err); 629 629 goto free_name; 630 630 } 631 631