summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-02-24 07:46:51 (GMT)
committerTomasz Stanislawski <t.stanislaws@samsung.com>2013-03-13 09:49:34 (GMT)
commit0c089d3638087b96502dcba7ec977dd87a6cebe1 (patch)
treea1aedd00da6a600800b8c874657e4f56fe68d656
parent2616e91517670a502ceffd976df3160982050c93 (diff)
v4l2-drm-example: Exit when no argument is specified
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-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));

Privacy Policy