summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-03-18 14:56:57 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-03-28 15:29:47 +0300
commitc7b5b7570476d8207a364e4d3625537078d3ba1f (patch)
tree894f7f18afbe8be45032973230ad1d5e6d201ae7
parent944f0765ee4dc30a9d520cc34d4f44d760b75b7d (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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/yavta.c b/yavta.c
index 6a7586c..d562863 100644
--- a/yavta.c
+++ b/yavta.c
@@ -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