lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220623084531.39837-1-jiapeng.chong@linux.alibaba.com>
Date:   Thu, 23 Jun 2022 16:45:31 +0800
From:   Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To:     kishon@...com
Cc:     lpieralisi@...nel.org, kw@...ux.com, bhelgaas@...gle.com,
        linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Subject: [PATCH] NTB: EPF: Fix missing error code in epf_ntb_bind()

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@...ux.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ