Skip to content

Commit 3305f43

Browse files
Dan Carpenterjonmason
authored andcommitted
NTB: EPF: Fix error code in epf_ntb_bind()
Return an error code if pci_register_driver() fails. Don't return success. Fixes: da51fd2 ("NTB: EPF: support NTB transfer between PCI RC and EP connection") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Souptick Joarder (HPE) <jrdr.linux@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
1 parent ae9f38a commit 3305f43

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,8 @@ static int epf_ntb_bind(struct pci_epf *epf)
13211321
pci_vntb_table[0].vendor = ntb->vntb_vid;
13221322
pci_vntb_table[0].device = ntb->vntb_pid;
13231323

1324-
if (pci_register_driver(&vntb_pci_driver)) {
1324+
ret = pci_register_driver(&vntb_pci_driver);
1325+
if (ret) {
13251326
dev_err(dev, "failure register vntb pci driver\n");
13261327
goto err_bar_alloc;
13271328
}

0 commit comments

Comments
 (0)