summaryrefslogtreecommitdiff
path: root/src/libcamera/camera.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-07-12 21:13:57 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-07-14 16:00:39 +0300
commita775234d6612a1fbd3bb586de4704883c1fcd817 (patch)
tree7bdaf01b13b0726c650779c98b280266fdd4c889 /src/libcamera/camera.cpp
parente8e80bfa8d6421057ad145f93659309586e1200f (diff)
libcamera: camera: Don't check buffer count before freeing buffers
There's no need to check if buffers have been allocated before freeing them as the BufferPool::destroyBuffers() method is a no-op when no buffers have been allocated. Document this fact explicitly, and remove the buffer count check. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera/camera.cpp')
-rw-r--r--src/libcamera/camera.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
index 094f1b63..810cb129 100644
--- a/src/libcamera/camera.cpp
+++ b/src/libcamera/camera.cpp
@@ -740,9 +740,6 @@ int Camera::freeBuffers()
return -EACCES;
for (Stream *stream : activeStreams_) {
- if (!stream->bufferPool().count())
- continue;
-
/*
* All mappings must be destroyed before buffers can be freed
* by the V4L2 device that has allocated them.