Hi, On 6/27/23 18:55, Andy Shevchenko wrote: > On Tue, Jun 27, 2023 at 05:08:39PM +0200, Jacopo Mondi wrote: >> On Tue, Jun 27, 2023 at 03:18:08PM +0200, Hans de Goede wrote: > > ... > >>> mode = v4l2_find_nearest_size(ov2680_mode_data, >>> - ARRAY_SIZE(ov2680_mode_data), width, >>> - height, fmt->width, fmt->height); >>> + ARRAY_SIZE(ov2680_mode_data), >>> + width, height, >>> + format->format.width, >>> + format->format.height); >>> if (!mode) >>> return -EINVAL; >> >> Nit: only if you have to resend, could this be dropped? mode will be NULL >> only if ov2680_mode_data[] has no entries. > > We shouldn't rely on the implementation details of some API if it's not > advertised that way. Even if it is, the robustness of the code is better with > this check. Note non of this is really important (as Jacopo already mentioned it is just a nitpick) since this code is completely removed in a later patch. Also note that the check was already there, so removing it would be out of scope for this patch. Regards, Hans