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]
Message-Id: <a9ada686e1f1c6f496e423deaf108f1bcfd94d7d.1721123679.git.geert+renesas@glider.be>
Date: Tue, 16 Jul 2024 11:57:25 +0200
From: Geert Uytterhoeven <geert+renesas@...der.be>
To: Rob Herring <robh@...nel.org>,
	Saravana Kannan <saravanak@...gle.com>,
	Stephen Boyd <sboyd@...nel.org>
Cc: devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-i2c@...r.kernel.org,
	Geert Uytterhoeven <geert+renesas@...der.be>
Subject: [PATCH] of/platform: Fix inverted check in of_platform_notify()

The check for of_node_check_flag() was accidentally inverted, causing
i2c-demux-pinctrl to fail on the Koelsch development board:

    i2c-demux-pinctrl i2c-mux1: failed to setup demux-adapter 0 (-19)
    i2c-demux-pinctrl i2c-mux2: failed to setup demux-adapter 0 (-19)
    i2c-demux-pinctrl i2c-mux3: failed to setup demux-adapter 0 (-19)
    i2c-demux-pinctrl i2c-mux2: Failed to create device link (0x180) with e6ef0000.video
    i2c-demux-pinctrl i2c-mux2: Failed to create device link (0x180) with e6ef1000.video
    i2c-demux-pinctrl i2c-mux2: Failed to create device link (0x180) with hdmi-in
    i2c-demux-pinctrl i2c-mux2: Failed to create device link (0x180) with hdmi-out

and anything relying on I2C connected to these muxes fails, too.

Also, loading the 25LC040 DT overlay on Ebisu using the out-of-tree
of-configfs now fails, too.

Fixes: 98290f295fbcf18f ("of/platform: Allow overlays to create platform devices from the root node")
Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
---
 drivers/of/platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index bda6da866cc8f8f6..86be4dfb9323d8fc 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -739,7 +739,7 @@ static int of_platform_notify(struct notifier_block *nb,
 		parent = rd->dn->parent;
 		/* verify that the parent is a bus (or the root node) */
 		if (!of_node_is_root(parent) &&
-		    of_node_check_flag(parent, OF_POPULATED_BUS))
+		    !of_node_check_flag(parent, OF_POPULATED_BUS))
 			return NOTIFY_OK;	/* not for us */
 
 		/* already populated? (driver using of_populate manually) */
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ