mirror of
https://github.com/linux-usb-gadgets/libusbgx.git
synced 2025-07-26 08:05:06 +03:00
uvc: fix return check on scandir
The function init_frames is falsely checking for the negative result from scandir on an unsigned variable. This will never be true. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
This commit is contained in:
parent
741230bc4b
commit
157cbd83c6
1 changed files with 2 additions and 2 deletions
|
@ -174,8 +174,8 @@ int init_frames(struct usbg_f_uvc *uvc, int j)
|
|||
return ret;
|
||||
}
|
||||
|
||||
nmb = scandir(fpath, &dent, frame_select, frame_sort);
|
||||
if (nmb < 0) {
|
||||
ret = scandir(fpath, &dent, frame_select, frame_sort);
|
||||
if (ret < 0) {
|
||||
ret = usbg_translate_error(errno);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue