* [PATCH] NTB: EPF: Fix missing error code in epf_ntb_bind()
@ 2022-06-23 8:45 Jiapeng Chong
0 siblings, 0 replies; only message in thread
From: Jiapeng Chong @ 2022-06-23 8:45 UTC (permalink / raw)
To: kishon; +Cc: lpieralisi, kw, bhelgaas, linux-pci, linux-kernel, Jiapeng Chong
The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'ret'.
This was found by smatch:
drivers/pci/endpoint/functions/pci-epf-vntb.c:1317 epf_ntb_bind() warn: missing error code 'ret'.
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/pci/endpoint/functions/pci-epf-vntb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c
index ebf7e243eefa..8791638b9f48 100644
--- a/drivers/pci/endpoint/functions/pci-epf-vntb.c
+++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c
@@ -1314,6 +1314,7 @@ static int epf_ntb_bind(struct pci_epf *epf)
if (pci_register_driver(&vntb_pci_driver)) {
dev_err(dev, "failure register vntb pci driver\n");
+ ret = -EINVAL;
goto err_bar_alloc;
}
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-23 8:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-23 8:45 [PATCH] NTB: EPF: Fix missing error code in epf_ntb_bind() Jiapeng Chong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).