From 0c089d3638087b96502dcba7ec977dd87a6cebe1 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 24 Feb 2013 08:46:51 +0100 Subject: v4l2-drm-example: Exit when no argument is specified Signed-off-by: Laurent Pinchart --- v4l2-drm-example/dmabuf-sharing.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'v4l2-drm-example') diff --git a/v4l2-drm-example/dmabuf-sharing.c b/v4l2-drm-example/dmabuf-sharing.c index 7577a6e..35cb38c 100644 --- a/v4l2-drm-example/dmabuf-sharing.c +++ b/v4l2-drm-example/dmabuf-sharing.c @@ -150,8 +150,10 @@ static inline int parse_rect(char *s, struct v4l2_rect *r) static int parse_args(int argc, char *argv[], struct setup *s) { - if (argc <= 1) + if (argc <= 1) { usage(argv[0]); + return -1; + } int c, ret; memset(s, 0, sizeof(*s)); -- cgit v1.2.3