1
0
Fork 0
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:
Michael Grzeschik 2021-10-28 00:39:47 +02:00
parent 741230bc4b
commit 157cbd83c6

View file

@ -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;
}