libcamera: v4l2_device: Fix error messages in setControls()
The error messages are copied from getControls() without being updated
for the set controls case, fix this.
Fixes: eb068f4e67
("libcamera: v4l2_device: Implement get and set controls")
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
8a92e6fc72
commit
808a7fc04e
1 changed files with 2 additions and 2 deletions
|
@ -287,13 +287,13 @@ int V4L2Device::setControls(V4L2ControlList *ctrls)
|
|||
|
||||
/* Generic validation error. */
|
||||
if (errorIdx == 0 || errorIdx >= count) {
|
||||
LOG(V4L2, Error) << "Unable to read controls: "
|
||||
LOG(V4L2, Error) << "Unable to set controls: "
|
||||
<< strerror(ret);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* A specific control failed. */
|
||||
LOG(V4L2, Error) << "Unable to read control " << errorIdx
|
||||
LOG(V4L2, Error) << "Unable to set control " << errorIdx
|
||||
<< ": " << strerror(ret);
|
||||
count = errorIdx - 1;
|
||||
ret = errorIdx;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue