Re: [PATCH v5 04/13] media: uvcvideo: Check controls flags before accessing them

2021-03-17 Thread Hans Verkuil
On 16/03/2021 18:59, Ricardo Ribalda wrote: > We can figure out if reading/writing a set of controls can fail without > accessing them by checking their flags. > > This way we can honor the API closer: > > If an error is found when validating the list of controls passed with > VIDIOC_G_EXT_CTRLS,

[PATCH v5 04/13] media: uvcvideo: Check controls flags before accessing them

2021-03-16 Thread Ricardo Ribalda
We can figure out if reading/writing a set of controls can fail without accessing them by checking their flags. This way we can honor the API closer: If an error is found when validating the list of controls passed with VIDIOC_G_EXT_CTRLS, then error_idx shall be set to ctrls->count to indicate t