summaryrefslogtreecommitdiff
path: root/v4l2-drm-example
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-02-24 08:46:51 +0100
committerTomasz Stanislawski <t.stanislaws@samsung.com>2013-03-13 10:49:34 +0100
commit0c089d3638087b96502dcba7ec977dd87a6cebe1 (patch)
treea1aedd00da6a600800b8c874657e4f56fe68d656 /v4l2-drm-example
parent2616e91517670a502ceffd976df3160982050c93 (diff)
v4l2-drm-example: Exit when no argument is specified
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'v4l2-drm-example')
-rw-r--r--v4l2-drm-example/dmabuf-sharing.c4
1 files changed, 3 insertions, 1 deletions
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));