Skip to contentSkip to conversation

commands: of_dump: Fix return value

PATCH Applied Teresa Gámez 2 participants 2 messages Sep 11, 2014 – Sep 12, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 commands: of_dump: Fix return value

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

---
 commands/of_dump.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
commands/of_dump.c +2 -2
index 1222ebf..513a4b8 100644
@@ -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)
Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 4 lines · Teresa Gámez

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

Applied, thanks

Sascha

Quoted 34 lines
---
 commands/of_dump.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
commands/of_dump.c +2 -2
index 1222ebf..513a4b8 100644
@@ -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)
Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox