diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-03-18 14:56:57 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-03-28 15:29:47 +0300 |
commit | c7b5b7570476d8207a364e4d3625537078d3ba1f (patch) | |
tree | 894f7f18afbe8be45032973230ad1d5e6d201ae7 | |
parent | 944f0765ee4dc30a9d520cc34d4f44d760b75b7d (diff) |
Return an error status when capture fails
The video_do_capture() function overrides the error code when a failure
occurs. This prevents returning an error status to the calling process.
Fix it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r-- | yavta.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2256,7 +2256,8 @@ static int video_do_capture(struct device *dev, unsigned int nframes, i, ts.tv_sec, ts.tv_nsec/1000, fps, bps); done: - return video_free_buffers(dev); + video_free_buffers(dev); + return ret; } #define V4L_BUFFERS_DEFAULT 8 |