In case there's no struct image_type_params::set_header callback, no
"errno" will be set. Don't fail with an error message, followed by
"Success". Remove the printing of the human readable "errno" value.

Signed-off-by: Marc Kleine-Budde <m...@pengutronix.de>
---
 tools/mkimage.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/mkimage.c b/tools/mkimage.c
index 30c6df77081f..35a6b1fb799c 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -760,8 +760,8 @@ int main(int argc, char **argv)
        if (tparams->set_header)
                tparams->set_header (ptr, &sbuf, ifd, &params);
        else {
-               fprintf (stderr, "%s: Can't set header for %s: %s\n",
-                       params.cmdname, tparams->name, strerror(errno));
+               fprintf (stderr, "%s: Can't set header for %s\n",
+                       params.cmdname, tparams->name);
                exit (EXIT_FAILURE);
        }
 
-- 
2.35.1


Reply via email to