mirror of
https://github.com/linux-usb-gadgets/libusbgx.git
synced 2025-07-26 03:45:06 +03:00
uvc: fix init_formats function
The return value of scandir is used in init_frames to iterate over the elements. The iteration is done over nmb not ret. So this patch is fixing this to fill the right variable. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
This commit is contained in:
parent
afec0d6e71
commit
50fe6a79bc
1 changed files with 2 additions and 2 deletions
|
@ -173,8 +173,8 @@ int init_frames(struct usbg_f_uvc *uvc, int j)
|
|||
return ret;
|
||||
}
|
||||
|
||||
ret = scandir(fpath, &dent, frame_select, frame_sort);
|
||||
if (ret < 0) {
|
||||
nmb = scandir(fpath, &dent, frame_select, frame_sort);
|
||||
if (nmb < 0) {
|
||||
ret = usbg_translate_error(errno);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue