mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
spa: v4l2: query_ext_ctrl_ioctl(): only check errno on failure
`errno` is not guaranteed to be cleared, so only check it if the previous call actually failed.
This commit is contained in:
parent
0549996c87
commit
de609ff994
1 changed files with 1 additions and 1 deletions
|
|
@ -1072,7 +1072,7 @@ static int query_ext_ctrl_ioctl(struct port *port, struct v4l2_query_ext_ctrl *q
|
|||
|
||||
if (port->have_query_ext_ctrl) {
|
||||
res = xioctl(dev->fd, VIDIOC_QUERY_EXT_CTRL, qctrl);
|
||||
if (errno != ENOTTY)
|
||||
if (res == 0 || errno != ENOTTY)
|
||||
return res;
|
||||
port->have_query_ext_ctrl = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue