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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220817084444.2876059-2-yangyingliang@huawei.com>
Date:   Wed, 17 Aug 2022 16:44:44 +0800
From:   Yang Yingliang <yangyingliang@...wei.com>
To:     <linux-kernel@...r.kernel.org>, <linux-pci@...r.kernel.org>
CC:     <bhelgaas@...gle.com>
Subject: [PATCH -next 2/2] PCI: switch to use dev_err_probe()

Use dev_err_probe() to simplify code and print error code.

Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
---
 drivers/pci/probe.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 0e947f24153e..f2430da8a30b 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -3054,10 +3054,9 @@ int pci_host_probe(struct pci_host_bridge *bridge)
 	int ret;
 
 	ret = pci_scan_root_bus_bridge(bridge);
-	if (ret < 0) {
-		dev_err(bridge->dev.parent, "Scanning root bridge failed");
-		return ret;
-	}
+	if (ret < 0)
+		return dev_err_probe(bridge->dev.parent, ret,
+				     "Scanning root bridge failed");
 
 	bus = bridge->bus;
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ