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-next>] [day] [month] [year] [list]
Date: Tue,  2 Jul 2024 13:08:39 -0500
From: superm1@...nel.org
To: Bjorn Helgaas <bhelgaas@...gle.com>,
	Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Cc: linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Mario Limonciello <mario.limonciello@....com>,
	Amit Pundir <amit.pundir@...aro.org>,
	Neil Armstrong <neil.armstrong@...aro.org>,
	Caleb Connolly <caleb.connolly@...aro.org>,
	Praveenkumar Patil <PraveenKumar.Patil@....com>
Subject: [PATCH v2] PCI/pwrctl: Don't show error when missing OF nodes

From: Mario Limonciello <mario.limonciello@....com>

commit 8fb18619d910 ("PCI/pwrctl: Create platform devices for child OF
nodes of the port node") introduced a new error message about populating
OF nodes. This message isn't relevant on non-OF platforms and
of_platform_populate() returns -ENODEV in this case, so don't show the
message on non-OF platforms.

Cc: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Cc: Amit Pundir <amit.pundir@...aro.org>
Cc: Neil Armstrong <neil.armstrong@...aro.org> # on SM8550-QRD, SM8650-QRD & SM8650-HDK
Cc: Caleb Connolly <caleb.connolly@...aro.org> # OnePlus 8T
Reported-by: Praveenkumar Patil <PraveenKumar.Patil@....com>
Fixes: 8fb18619d910 ("PCI/pwrctl: Create platform devices for child OF nodes of the port node")
Signed-off-by: Mario Limonciello <mario.limonciello@....com>
---
v1->v2:
 * Catch -ENODEV case instead (Bartosz)
---
 drivers/pci/bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index e4735428814d..231bc796ba04 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -353,7 +353,7 @@ void pci_bus_add_device(struct pci_dev *dev)
 	if (pci_is_bridge(dev)) {
 		retval = of_platform_populate(dev->dev.of_node, NULL, NULL,
 					      &dev->dev);
-		if (retval)
+		if (retval && retval != -ENODEV)
 			pci_err(dev, "failed to populate child OF nodes (%d)\n",
 				retval);
 	}
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ