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: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Souptick Joarder (HPE) <jrdr.linux@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
This commit is contained in:
parent
ae9f38adac
commit
3305f43cb6
@ -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].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");
|
||||
goto err_bar_alloc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user