diff options
author | Marcus Comstedt <marcus.comstedt@requtech.se> | 2023-05-15 15:44:23 +0000 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2023-06-14 18:38:25 +0800 |
commit | e533228d9ec4713c26f5e9900d27fd65847ed44b (patch) | |
tree | 83ed5b728ce19ac228d2184d8fd14458e69273ef /net | |
parent | cb4fe56eca1109780e97c68329e6b71ef33bf0e6 (diff) | |
download | u-boot-e533228d9ec4713c26f5e9900d27fd65847ed44b.tar.gz u-boot-e533228d9ec4713c26f5e9900d27fd65847ed44b.tar.bz2 u-boot-e533228d9ec4713c26f5e9900d27fd65847ed44b.zip |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/dsa-uclass.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa-uclass.c b/net/dsa-uclass.c index dd78e5744d..f64c68e340 100644 --- a/net/dsa-uclass.c +++ b/net/dsa-uclass.c @@ -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; |