1
0
Fork 0
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:
Michael Grzeschik 2022-07-05 14:30:35 +02:00
parent 0607844246
commit afec0d6e71

View file

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