[PATCH] commands: of_dump: Fix return value

Teresa Gámez t.gamez at phytec.de
Thu Sep 11 08:04:49 PDT 2014


In an error case the return value is set nicely
but 0 is always beeing returned.

Signed-off-by: Teresa Gámez <t.gamez at phytec.de>
---
 commands/of_dump.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/commands/of_dump.c b/commands/of_dump.c
index 1222ebf..513a4b8 100644
--- a/commands/of_dump.c
+++ b/commands/of_dump.c
@@ -34,7 +34,7 @@
 static int do_of_dump(int argc, char *argv[])
 {
 	int opt;
-	int ret;
+	int ret = 0;
 	int fix = 0;
 	struct device_node *root = NULL, *node, *of_free = NULL;
 	char *dtbfile = NULL;
@@ -117,7 +117,7 @@ out:
 	if (of_free)
 		of_delete_node(of_free);
 
-	return 0;
+	return ret;
 }
 
 BAREBOX_CMD_HELP_START(of_dump)
-- 
1.7.0.4




More information about the barebox mailing list