From: Dan Carpenter <dan.carpenter@oracle.com>
To: Kishon Vijay Abraham I <kishon@ti.com>, Frank Li <Frank.Li@nxp.com>
Cc: "Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Jon Mason" <jdmason@kudzu.us>,
"Souptick Joarder (HPE)" <jrdr.linux@gmail.com>,
linux-pci@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH 1/2] NTB: EPF: Fix error code in epf_ntb_bind()
Date: Mon, 1 Aug 2022 13:15:25 +0300 [thread overview]
Message-ID: <YuenvTPwQj022P13@kili> (raw)
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
next reply other threads:[~2022-08-01 10:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 10:15 Dan Carpenter [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YuenvTPwQj022P13@kili \
--to=dan.carpenter@oracle.com \
--cc=Frank.Li@nxp.com \
--cc=bhelgaas@google.com \
--cc=jdmason@kudzu.us \
--cc=jrdr.linux@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kishon@ti.com \
--cc=kw@linux.com \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.