[PATCH v2 4/6] commands: of_dump: remove duplicate error message

Ahmad Fatoum a.fatoum at pengutronix.de
Fri May 19 03:01:18 PDT 2023


of_read_file will already print to log on failures, so we need not print
a second message in of_dump on error.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
v1 -> v2:
  - new patch
---
 commands/of_dump.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/commands/of_dump.c b/commands/of_dump.c
index 87a0b1ba535c..f8e7280fd9f2 100644
--- a/commands/of_dump.c
+++ b/commands/of_dump.c
@@ -72,11 +72,8 @@ static int do_of_dump(int argc, char *argv[])
 
 	if (dtbfile) {
 		root = of_read_file(dtbfile);
-		if (IS_ERR(root)) {
-			printf("Cannot open %s: %pe\n", dtbfile, root);
-			ret = PTR_ERR(root);
-			goto out;
-		}
+		if (IS_ERR(root))
+			return PTR_ERR(root);
 
 		of_free = root;
 	} else {
-- 
2.39.2




More information about the barebox mailing list