From fd1171a3ae33ae039a05a01887d4651b7c34d8f3 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 25 Oct 2011 13:59:45 +0200 Subject: Exit when VIDIOC_STREAMON fails. Signed-off-by: Laurent Pinchart --- yavta.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yavta.c b/yavta.c index 240b0eb..be2f40c 100644 --- a/yavta.c +++ b/yavta.c @@ -980,7 +980,9 @@ static int video_do_capture(struct device *dev, unsigned int nframes, } /* Start streaming. */ - video_enable(dev, 1); + ret = video_enable(dev, 1); + if (ret < 0) + goto done; size = 0; clock_gettime(CLOCK_MONOTONIC, &start); -- cgit v1.2.3