tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>
diff --git a/tools/imagetool.c b/tools/imagetool.c
index 688169b..e1021f4 100644
--- a/tools/imagetool.c
+++ b/tools/imagetool.c
@@ -71,6 +71,11 @@
 		}
 	}
 
+	if (retval != 0) {
+		fprintf(stderr, "%s: cannot detect image type\n",
+			params->cmdname);
+	}
+
 	return retval;
 }