examples: print the usage message when a required option is missing
[libam7xxx.git] / examples / am7xxx-play.c
index 38812a4..e958eee 100644 (file)
@@ -777,7 +777,8 @@ int main(int argc, char *argv[])
        }
 
        if (input_path == NULL) {
        }
 
        if (input_path == NULL) {
-               fprintf(stderr, "The -i option must always be passed\n");
+               fprintf(stderr, "The -i option must always be passed\n\n");
+               usage(argv[0]);
                ret = -EINVAL;
                goto out;
        }
                ret = -EINVAL;
                goto out;
        }