summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2023-05-19 12:01:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2023-05-25 09:36:01 +0200
commit4c7f352e80e7bf66014a7c81b3cc20c3d182afd5 (patch)
treead187fafb498242da78e596acacfb9122798e40c /commands
parent760914f2585956db23e7d4196649a09e6aba9b21 (diff)
downloadbarebox-4c7f352e80e7bf66014a7c81b3cc20c3d182afd5.tar.gz
barebox-4c7f352e80e7bf66014a7c81b3cc20c3d182afd5.tar.xz
commands: of_dump: remove duplicate error message
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@pengutronix.de> Link: https://lore.barebox.org/20230519100120.2365970-5-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r--commands/of_dump.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/commands/of_dump.c b/commands/of_dump.c
index 87a0b1ba53..f8e7280fd9 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 {