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:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user