summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2023-06-08 15:40:40 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2023-06-09 08:41:45 +0200
commitc565766f01db9ae27035c5f48231939ec5e053ef (patch)
tree98f7d9758f975ccda6cc825f6349912689a74f6c /commands
parentbf7405c00016beb7860729d18d4fe53772b81db7 (diff)
downloadbarebox-c565766f01db9ae27035c5f48231939ec5e053ef.tar.gz
barebox-c565766f01db9ae27035c5f48231939ec5e053ef.tar.xz
of: change superfluous of_fix_tree int return type to void
of_fix_tree always returns 0, so propagating its return code and checking it serves no purpose. Let's just change it to void *. I considered having it return the first argument, but that could mislead users to think that the argument is not modified. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230608134040.2123869-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r--commands/of_compatible.c7
-rw-r--r--commands/of_dump.c7
2 files changed, 4 insertions, 10 deletions
diff --git a/commands/of_compatible.c b/commands/of_compatible.c
index b460fecd3a..d8704d50bb 100644
--- a/commands/of_compatible.c
+++ b/commands/of_compatible.c
@@ -57,11 +57,8 @@ static int do_of_compatible(int argc, char *argv[])
root = of_free = of_dup(root);
}
- if (fix) {
- ret = of_fix_tree(root);
- if (ret)
- goto out;
- }
+ if (fix)
+ of_fix_tree(root);
node = of_find_node_by_path_or_alias(root, nodename);
if (!node) {
diff --git a/commands/of_dump.c b/commands/of_dump.c
index 1d6c019bf0..c77dc27c99 100644
--- a/commands/of_dump.c
+++ b/commands/of_dump.c
@@ -84,11 +84,8 @@ static int do_of_dump(int argc, char *argv[])
root = of_free = of_dup(root);
}
- if (fix) {
- ret = of_fix_tree(root);
- if (ret)
- goto out;
- }
+ if (fix)
+ of_fix_tree(root);
node = of_find_node_by_path_or_alias(root, nodename);
if (!node) {