net: dsa: Fix OF fallback lookup for ports
PATCH 1/1 net: dsa: Fix OF fallback lookup for ports
The variable 'node' was already invalid, so using it for further lookup will not work.
Signed-off-by Marcus Comstedt <[email protected]>
---
net/dsa-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/dsa-uclass.c +1 -1
@@ -381,7 +381,7 @@ static int dsa_post_bind(struct udevice *dev) node =ofnode_find_subnode (node,"ports" );if (!ofnode_valid (node)) - node =ofnode_find_subnode (node,"ethernet-ports" ); + node =ofnode_find_subnode (dev_ofnode (dev),"ethernet-ports" );if (!ofnode_valid (node)) {dev_err (dev,"ports node is missing under DSA device!\n" );return -EINVAL ;
Signature · 1 line
2.39.2
Quoted 9 lines
-----Original Message-----
From: Marcus Comstedt <[email protected]>
Sent: Monday, May 15, 2023 6:44 PM
To: [email protected]
Cc: Marcus Comstedt <[email protected]>; Claudiu Manoil <[email protected]>; Joe Hershberger <[email protected]>; Ramon Fried <[email protected]>
Subject: [PATCH] net: dsa: Fix OF fallback lookup for ports
Quoted 4 lines
The variable 'node' was already invalid, so using it for further lookup will not work.
Signed-off-by Marcus Comstedt <[email protected]>
Fixes fc054d563b (net: Introduce DSA class for Ethernet switches)
Reviewed-by Claudiu Manoil <[email protected]>
Thanks. Funny the issue was caught so late. Apparently the newer 'ethernet-ports' term had a slow adoption.