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@xxxxxxxxxxxxxx> --- 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