[libcamera-devel] [PATCH] libcamera: v4l2_device: Remove unused set of ret

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Oct 28 02:31:05 CET 2020


Hi Niklas,

Thank you for the patch.

On Wed, Oct 28, 2020 at 02:21:14AM +0100, 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: Laurent Pinchart <laurent.pinchart 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,

Laurent Pinchart


More information about the libcamera-devel mailing list