diff --git a/src/barebox-state/state.c b/src/barebox-state/state.c index d07f522..a993088 100644 --- a/src/barebox-state/state.c +++ b/src/barebox-state/state.c @@ -306,8 +306,8 @@ c = strrchr(of_path, '/'); if (!c) return -ENODEV; - *c = '0'; - parent = of_find_node_by_path(of_path); + *c = '\0'; + parent = of_find_node_by_path_from(root, of_path); if (!parent) parent = root;