[libcamera-devel] [PATCH] libcamera: v4l2_device: Remove unused set of ret
Kieran Bingham
kieran.bingham at ideasonboard.com
Wed Oct 28 11:32:17 CET 2020
On 28/10/2020 01:21, Niklas Söderlund wrote:
> The last assignment of the ret variable in getControls() is not consumed
> so it's unnecessary to set it. This likely originates from a similar
> code flow in setControls() where the ret variable is later consumed.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> ---
> src/libcamera/v4l2_device.cpp | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
> index 31d4dad0ee47b734..f747ba790886cfe0 100644
> --- a/src/libcamera/v4l2_device.cpp
> +++ b/src/libcamera/v4l2_device.cpp
> @@ -243,7 +243,6 @@ ControlList V4L2Device::getControls(const std::vector<uint32_t> &ids)
> LOG(V4L2, Error) << "Unable to read control " << errorIdx
> << ": " << strerror(-ret);
> count = errorIdx - 1;
> - ret = errorIdx;
> }
>
> updateControls(&ctrls, v4l2Ctrls, count);
>
--
Regards
--
Kieran
More information about the libcamera-devel
mailing list