mirror of
https://github.com/linux-usb-gadgets/libusbgx.git
synced 2025-07-26 06:35:06 +03:00
uvc: fix exporting attrs with layouts missing a format
When the one of the supported formats is missing in the configfs layout, currently the export function will run into an error. We fix it by just passing 0 if the format is missing to keep on parsing. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
This commit is contained in:
parent
0607844246
commit
afec0d6e71
1 changed files with 6 additions and 0 deletions
|
@ -725,6 +725,9 @@ static int uvc_export_format_attrs(struct usbg_f_uvc *uvcf, const char *format,
|
|||
break;
|
||||
}
|
||||
|
||||
if (ret == USBG_ERROR_NOT_FOUND)
|
||||
ret = 0;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -745,6 +748,9 @@ static int uvc_export_frame_attrs(struct usbg_f_uvc *uvcf, const char *format,
|
|||
break;
|
||||
}
|
||||
|
||||
if (ret == USBG_ERROR_NOT_FOUND)
|
||||
ret = 0;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue