summaryrefslogtreecommitdiff
path: root/yavta.c
diff options
context:
space:
mode:
authorTuukka Toivonen <tuukka.toivonen@intel.com>2015-12-14 09:49:57 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2015-12-14 20:39:26 +0200
commit0a979e390ed828a85d26f6b311b4ab14ca681882 (patch)
tree7014219ba360ff730ca24e4bb71554a8d89445c0 /yavta.c
parent6f152130616462e7794a36c5e5be7f590fd78032 (diff)
Return proper error code if STREAMON fails
Return the error code if video_enable() and VIDIOC_STREAMON fails. Signed-off-by: Tuukka Toivonen <tuukka.toivonen@intel.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'yavta.c')
-rw-r--r--yavta.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/yavta.c b/yavta.c
index 09eb485..49361ad 100644
--- a/yavta.c
+++ b/yavta.c
@@ -1708,7 +1708,9 @@ static int video_do_capture(struct device *dev, unsigned int nframes,
}
/* Stop streaming. */
- video_enable(dev, 0);
+ ret = video_enable(dev, 0);
+ if (ret < 0)
+ return ret;
if (nframes == 0) {
printf("No frames captured.\n");