diff options
Diffstat (limited to 'commands/of_property.c')
-rw-r--r-- | commands/of_property.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/commands/of_property.c b/commands/of_property.c index d1a9a17c55..8ffe30b25f 100644 --- a/commands/of_property.c +++ b/commands/of_property.c @@ -175,7 +175,7 @@ static int do_of_property(int argc, char *argv[]) int set = 0; int ret; char *path = NULL, *propname = NULL; - struct device_node *root, *node = NULL; + struct device_node *node = NULL; struct property *pp = NULL; while ((opt = getopt(argc, argv, "ds")) > 0) { @@ -194,15 +194,9 @@ static int do_of_property(int argc, char *argv[]) if (optind == argc) return COMMAND_ERROR_USAGE; - root = of_get_root_node(); - if (!root) { - printf("root node not set\n"); - return -ENOENT; - } - if (optind < argc) { path = argv[optind]; - node = of_find_node_by_path(root, path); + node = of_find_node_by_path(path); if (!node) { printf("Cannot find nodepath %s\n", path); return -ENOENT; |