From 818b7371465ebb96018cd10ee10db807d34fba68 Mon Sep 17 00:00:00 2001 From: Milan Zamazal Date: Fri, 24 Jan 2025 22:57:52 +0100 Subject: libcamera: software_isp: Move a non-loop condition out of the loop The check for the number of outputs is done in a loop over the outputs. It should be moved out of the loop as it's not loop specific and is just repeated there. This is a cosmetic change not changing any functionality. Signed-off-by: Milan Zamazal Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/libcamera/software_isp/software_isp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp index 2bea64d9..44baf200 100644 --- a/src/libcamera/software_isp/software_isp.cpp +++ b/src/libcamera/software_isp/software_isp.cpp @@ -291,11 +291,13 @@ int SoftwareIsp::queueBuffers(uint32_t frame, FrameBuffer *input, if (outputs.empty()) return -EINVAL; + /* We only support a single stream for now. */ + if (outputs.size() != 1) + return -EINVAL; + for (auto [stream, buffer] : outputs) { if (!buffer) return -EINVAL; - if (outputs.size() != 1) /* only single stream atm */ - return -EINVAL; } for (auto iter = outputs.begin(); iter != outputs.end(); iter++) -- cgit v1.2.1