Commit 3305f43c authored by Dan Carpenter's avatar Dan Carpenter Committed by Jon Mason

NTB: EPF: Fix error code in epf_ntb_bind()

Return an error code if pci_register_driver() fails.  Don't return
success.

Fixes: da51fd247424 ("NTB: EPF: support NTB transfer between PCI RC and EP connection")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarSouptick Joarder (HPE) <jrdr.linux@gmail.com>
Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
parent ae9f38ad
...@@ -1321,7 +1321,8 @@ static int epf_ntb_bind(struct pci_epf *epf) ...@@ -1321,7 +1321,8 @@ static int epf_ntb_bind(struct pci_epf *epf)
pci_vntb_table[0].vendor = ntb->vntb_vid; pci_vntb_table[0].vendor = ntb->vntb_vid;
pci_vntb_table[0].device = ntb->vntb_pid; pci_vntb_table[0].device = ntb->vntb_pid;
if (pci_register_driver(&vntb_pci_driver)) { ret = pci_register_driver(&vntb_pci_driver);
if (ret) {
dev_err(dev, "failure register vntb pci driver\n"); dev_err(dev, "failure register vntb pci driver\n");
goto err_bar_alloc; goto err_bar_alloc;
} }
......
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