mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-23 12:14:32 +08:00
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 <marcus.comstedt@requtech.se> Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
cb4fe56eca
commit
e533228d9e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user