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>
This commit is contained in:
Laurent Pinchart
2019-07-12 21:13:57 +03:00
parent e8e80bfa8d
commit a775234d66
2 changed files with 3 additions and 3 deletions

View File

@@ -311,6 +311,9 @@ void BufferPool::createBuffers(unsigned int count)
/**
* \brief Release all buffers from pool
*
* If no buffers have been created or if buffers have already been released no
* operation is performed.
*/
void BufferPool::destroyBuffers()
{