diff options
author | Tuukka Toivonen <tuukka.toivonen@intel.com> | 2015-12-14 09:49:57 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2015-12-14 20:39:26 +0200 |
commit | 0a979e390ed828a85d26f6b311b4ab14ca681882 (patch) | |
tree | 7014219ba360ff730ca24e4bb71554a8d89445c0 | |
parent | 6f152130616462e7794a36c5e5be7f590fd78032 (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>
-rw-r--r-- | yavta.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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"); |