Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH 1/2] NTB: EPF: Fix error code in epf_ntb_bind()
@ 2022-08-01 10:15 Dan Carpenter
  2022-08-01 10:17 ` [PATCH 2/2] NTB: EPF: Tidy up some bounds checks Dan Carpenter
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Dan Carpenter @ 2022-08-01 10:15 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Frank Li
  Cc: Lorenzo Pieralisi, Krzysztof Wilczyński, Bjorn Helgaas,
	Jon Mason, Souptick Joarder (HPE), linux-pci, kernel-janitors

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>
---
 drivers/pci/endpoint/functions/pci-epf-vntb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c
index 111568089d45..cf338f3cf348 100644
--- a/drivers/pci/endpoint/functions/pci-epf-vntb.c
+++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c
@@ -1312,7 +1312,8 @@ static int epf_ntb_bind(struct pci_epf *epf)
 
 	epf_set_drvdata(epf, ntb);
 
-	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;
 	}
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-08-12 14:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-01 10:15 [PATCH 1/2] NTB: EPF: Fix error code in epf_ntb_bind() Dan Carpenter
2022-08-01 10:17 ` [PATCH 2/2] NTB: EPF: Tidy up some bounds checks Dan Carpenter
2022-08-02 10:49   ` Souptick Joarder
2022-08-02 11:01     ` Dan Carpenter
2022-08-02 11:20       ` Dan Carpenter
2022-08-02 11:32         ` Souptick Joarder
2022-08-02 10:16 ` [PATCH 1/2] NTB: EPF: Fix error code in epf_ntb_bind() Souptick Joarder
2022-08-12 14:16 ` Jon Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox